Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
8752d024
Commit
8752d024
authored
Apr 17, 2020
by
Adam Cohen
Committed by
Achilleas Pipinellis
Apr 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Secure Team specific style to Go guidelines
parent
3c71ba4b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
doc/development/go_guide/index.md
doc/development/go_guide/index.md
+18
-0
No files found.
doc/development/go_guide/index.md
View file @
8752d024
...
@@ -379,6 +379,24 @@ are:
...
@@ -379,6 +379,24 @@ are:
To reduce unnecessary differences between two distribution methods, Omnibus and
To reduce unnecessary differences between two distribution methods, Omnibus and
CNG
**should always use the same Go version**
.
CNG
**should always use the same Go version**
.
## Secure Team standards and style guidelines
The following are some style guidelines that are specific to the Secure Team.
### Code style and format
Use
`goimports -local gitlab.com/gitlab-org`
before committing.
[
goimports
](
https://godoc.org/golang.org/x/tools/cmd/goimports
)
is a tool that automatically formats Go source code using
[
Gofmt
](
https://golang.org/cmd/gofmt/
)
, in addition to formatting import lines,
adding missing ones and removing unreferenced ones.
By using the
`-local gitlab.com/gitlab-org`
option,
`goimports`
will group locally referenced
packages separately from external ones. See
[
the imports section
](
https://github.com/golang/go/wiki/CodeReviewComments#imports
)
of the Code Review Comments page on the Go wiki for more details.
Most editors/IDEs will allow you to run commands before/after saving a file, you can set it
up to run
`goimports -local gitlab.com/gitlab-org`
so that it's applied to every file when saving.
---
---
[
Return to Development documentation
](
../README.md
)
.
[
Return to Development documentation
](
../README.md
)
.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment