diff --git a/STYLEGUIDE.md b/STYLEGUIDE.md index 82a95ccd7..2751d266c 100644 --- a/STYLEGUIDE.md +++ b/STYLEGUIDE.md @@ -57,6 +57,15 @@ Executing `make lint` uses `goimports` which is configured to ensure this struct `make imports` is also a useful tool in order to help create this structure. If all imports are in 1 import block (no lines of separation), `make imports` will modify the file in the appropriate order and structure. +If you use Goland or Intellij IDEA, setting the following under "Editor > Code Style > Go" in the "Imports" tab will match the above requirements: +``` +[x] Add parentheses for a single import +Sorting type [gofmt] +[x] Group stdlib imports + [x] Move all stdlib imports in a single group +[x] Group current project imports +[x] Move all import in a single declaration +``` ### Naming