I could find the conventions for naming packages in Go: no underscore between words, everything lowercase.
Does this convention apply to the filenames too?
Do you also put one struct in one file as if you did for a java class and then name the file after the struct?
Currently, if I have a struct WebServer, I put it in a file web_server.go.
There's a few guidelines to follow.
_test.go
are only compiled and run by the go test
tool.name_linux.go
will only build on linux, name_amd64.go
will only build on amd64. This is the same as having a //+build amd64
line at the top of the fileSee the go
docs for more details: https://pkg.go.dev/cmd/go