1
0
mirror of https://github.com/writeas/writeas-cli synced 2025-07-22 22:08:13 +00:00

CONTRIBUTING: Add import group conventions

As discussed in #20, this adds import grouping recommendations to the
coding conventions section of CONTRIBUTING.md.

Note that I replaced `go fmt` with `goimports` because `goimports`
implements a superset of the `go fmt` functionality.
This commit is contained in:
Abhinav Gupta 2018-12-17 07:49:51 -08:00
parent 5dfb56ec48
commit 71d204ab1c

View File

@ -22,11 +22,20 @@ Please follow our coding conventions below and make sure all of your commits are
We strive for consistency above all. Reading the small codebase should give you a good idea of the conventions we follow.
* We use `go fmt` before committing anything
* We use `goimports` before committing anything
* We aim to document all exported entities
* Go files are broken up into logical functional components
* General functions are extracted into modules when possible
### Import Groups
We aim for two import groups:
* Standard library imports
* Everything else
`goimports` already does this for you along with running `go fmt`.
## Design conventions
We maintain a few high-level design principles in all decisions we make. Keep these in mind while devising new functionality: