Add golang formatting documentation
This patch is migrated from [0] as the repo used to store Airship docs has changed to airship/docs. This patch addresses feedback found in the other patch by removing the manual import order specified to follow PEP8 standards as found in the OpenStack docs in favor of using the goimports tool. It is expected that when code is submitted it should have gofmt and goimports run against it before hand - but these will be enforced at the gate. Change-Id: I624bade922e034205643a5214295a0febea7953b
This commit is contained in:
parent
146650109a
commit
cd6c7104aa
@ -106,9 +106,18 @@ readability and maintainability.
|
||||
Known Standards
|
||||
-------------------------------------------------------
|
||||
Language Tools Used
|
||||
=============== ======================================
|
||||
=============== ======================================
|
||||
Go gofmt
|
||||
Python YAPF, Flake8
|
||||
=============== ======================================
|
||||
|
||||
Go Formatting
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Go code should be formatted using gofmt. When using gofmt be sure to use the
|
||||
-s flag to include simplification of code for example::
|
||||
|
||||
gofmt -s /path/to/file.go
|
||||
|
||||
Python PEP-8 Formatting
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
Loading…
x
Reference in New Issue
Block a user