Parcourir la 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 il y a 5 ans
Parent
révision
71d204ab1c
1 fichiers modifiés avec 10 ajouts et 1 suppressions
  1. +10
    -1
      .github/CONTRIBUTING.md

+ 10
- 1
.github/CONTRIBUTING.md Voir le fichier

@@ -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:


Chargement…
Annuler
Enregistrer