-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: Style Guide #100
Labels
Comments
An example of most of the things here: https://github.com/peter-edge/go-protolog |
+1. Also congrats on PR100! |
all proposals LGTM ..will comment on individual requests separately. w.r.t sub directories concatenating parent dir, I'd say no. Each dir should behave like an orphan |
Other things, more for myself to note:
|
File order: package pkg
const (
...
)
var (
...
)
// public struct
// public struct functions
// private struct functions
// private functions but only if they just apply to this struct, otherwise in a common file |
Empty structs: // no
type EmptyStruct {
}
// yes
type EmptyStruct {} |
merged |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is going to be a running list over the next week or so, but to kick it off, here's some proposals:
name_of_package.go
, ie inapi/server
, we haveserver.go
api/
ispackage api
api/server
ispackage apiserver
, and then we will haveapiserver.go
.name_of_package.go
. Every other file is just a helper file that implements the types.openstorage/api/server/volume.go
Line 76 in 8d07329
openstorage/volume/enumerator.go
Line 6 in 8d07329
Other things:
Thoughts?
The text was updated successfully, but these errors were encountered: