diff --git a/contribute/style-guides/backend.md b/contribute/style-guides/backend.md index 9f552216dc4..77c5e1656fa 100644 --- a/contribute/style-guides/backend.md +++ b/contribute/style-guides/backend.md @@ -1,27 +1,45 @@ # Backend style guide -Grafanas backend has been developed for a long time with a mix of code styles. +Grafanas backend has been developed for a long time with a mix of code styles. This guide explains how we want to write Go code in the future. -This style guide is a guide for how we want to write Go code in the future. Generally, we want to follow the style guides used in Go [Code Review Comments](https://code.google.com/p/go-wiki/wiki/CodeReviewComments) and Peter Bourgon's [Go: Best Practices for Production Environments](http://peter.bourgon.org/go-in-production/#formatting-and-style) +Unless stated otherwise, use the guidelines listed in the following articles: + +- [Effective Go](https://golang.org/doc/effective_go.html) +- [Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments) +- [Go: Best Practices for Production Environments](http://peter.bourgon.org/go-in-production/#formatting-and-style) ## Linting and formatting -We enforce strict `gofmt` formatting and use some linters on our codebase. You can lint the codebase with