blob: fb3d04e6a3959b5085f2e2ddc788dbe2800acc42 [file] [log] [blame]
Joey Armstronga144ef32024-01-11 11:26:41 -05001.. _Release Task Golang Syntax:
2
3GOLANG: Syntax formatting with gofmt
4====================================
5
6Use the gofmt command to reformat golang sources gathered outside the vendor/ directory.
7
8.. code-block:: shell-session
Joey Armstrong1eb713f2024-01-30 13:53:00 -05009 :caption: Golang source formatting
Joey Armstronga144ef32024-01-11 11:26:41 -050010
Eric Ball74a2e762025-08-27 12:34:53 -070011 % git clone ssh://gerrit.lfbroadband.org:29418/voltha-lib-go.git
Joey Armstrong1eb713f2024-01-30 13:53:00 -050012 % cd voltha-lib-go
13
14 % make sterile
Joey Armstronga144ef32024-01-11 11:26:41 -050015 % make golang-fmt
16
Joey Armstronga144ef32024-01-11 11:26:41 -050017 % find . ! -path './vendor/\*' -name '*.go' -print | xargs -n1 gofmt -s -e -w