Skip to content

yi-lin-1234/learning-go

Repository files navigation

learning-go

package naming convention

Best practice:

  1. In Go, package names should be short, concise, and descriptive.
  2. The convention is to use lowercase letters for package names, without underscores or mixedCase.
  3. The name should be a single word, or a series of words concatenated together, without using hyphens or dots.
  4. It is also recommended to avoid generic names like "util", "common", or "misc" for package names, as they don't provide much context or information about the package's purpose.

Some examples of well-named packages in Go include:

  • "fmt" for formatting functions
  • "net/http" for HTTP client and server functionality
  • "encoding/json" for JSON encoding and decoding functions
  • "io/ioutil" for file input/output functions

useful rescourse:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages