mirror of
https://github.com/golang-standards/project-layout.git
synced 2026-02-04 06:06:18 +00:00
pkg dir origins
This commit is contained in:
@@ -74,6 +74,8 @@ See the [`/pkg`](pkg/README.md) directory if you want to see which popular Go re
|
||||
|
||||
It's ok not to use it if your app project is really small and where an extra level of nesting doesn't add much value (unless you really want to :-)). Think about it when it's getting big enough and your root directory gets pretty busy (especially if you have a lot of non-Go app components).
|
||||
|
||||
The `pkg` directory origins: The old Go source code used to use `pkg` for its packages and then various Go projects in the community started copying the patteren (see [`this`](https://twitter.com/bradfitz/status/1039512487538970624) Brad Fitzpatrick's tweet for more context).
|
||||
|
||||
### `/vendor`
|
||||
|
||||
Application dependencies (managed manually or by your favorite dependency management tool like the new built-in [`Go Modules`](https://github.com/golang/go/wiki/Modules) feature). The `go mod vendor` command will create the `/vendor` directory for you. Note that you might need to add the `-mod=vendor` flag to your `go build` command if you are not using Go 1.14 where it's on by default.
|
||||
|
||||
Reference in New Issue
Block a user