Browse Source

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.
pull/22/head
Abhinav Gupta 5 years ago
parent
commit
71d204ab1c
1 changed files with 10 additions and 1 deletions
  1. +10
    -1
      .github/CONTRIBUTING.md

+ 10
- 1
.github/CONTRIBUTING.md 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:


Loading…
Cancel
Save