Skip to content

Commit

Permalink
Define lock coding convention
Browse files Browse the repository at this point in the history
  • Loading branch information
smarterclayton committed Sep 9, 2015
1 parent c993cf6 commit 23133a7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/devel/coding-conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Code conventions
- so pkg/controllers/autoscaler/foo.go should say `package autoscaler` not `package autoscalercontroller`.
- Unless there's a good reason, the `package foo` line should match the name of the directory in which the .go file exists.
- Importers can use a different name if they need to disambiguate.
- Locks should be called `lock` and should never be embedded (always `lock sync.Mutex`). When multiple locks are present, give each lock a distinct name following Go conventions - `stateLock`, `mapLock` etc.
- API conventions
- [API changes](api_changes.md)
- [API conventions](api-conventions.md)
Expand Down

0 comments on commit 23133a7

Please sign in to comment.