docs/contributing/design-patterns-and-conventions.md
Cortex adopts some design patterns and code conventions that we ask you to follow when contributing to the project. These conventions have been adopted based on the experience gained over the time and aim to enforce good coding practices and keep a consistent UX (ie. config).
Cortex follows the Go Code Review Comments styleguide and the Formatting and style section of Peter Bourgon's Go: Best Practices for Production Environments.
When registering a metric:
promauto.With(reg)NewComponent(reg prometheus.Registerer))Testing metrics:
testutil.GatherAndCompare()Naming:
_ (underscore) separated (ie. memcached_client)- (dash) separated (ie. memcached-client)addresses for a list of network endpoints)Documentation:
- (dash)