pkgname

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

README

Go Reference

pkgname

Linter and analyzer that detects package names that do not follow Go idiomatic naming conventions.

Usage

Install the linter:

go install github.com/uudashr/pkgname/cmd/pkgnamecheck@latest

Run the linter

pkgnamecheck ./...

Include import alias on the detection:

pkgnamecheck -include-import-alias ./...

References

Good package names are short and clear. They are lower case, with no under_scores or mixedCaps. ...

The Go Blog: Package names

The style of names typical of another language might not be idiomatic in a Go program. Here are two examples of names that might be good style in other languages but do not fit well in Go:

  • computeServiceClient
  • priority_queue

The Go Blog: Package names

By convention, packages are given lower case, single-word names; there should be no need for underscores or mixedCaps. ...

Effective Go - Package names

Documentation

Overview

Package pkgname provides analyzer for Go idiomatic package naming conventions.

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = NewAnalyzer()

Analyzer analyzes Go idiomatic package naming conventions.

Functions

func NewAnalyzer

func NewAnalyzer() *analysis.Analyzer

NewAnalyzer creates a new instance of the pkgname analyzer.

Types

This section is empty.

Directories

Path Synopsis
cmd
pkgnamecheck command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL