blob: c34e2de24fc27dedacdcc96fdac1f081abadd9b2 [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
Joey Armstrong1eb713f2024-01-30 13:53:00 -050011 % git clone ssh://gerrit.opencord.org:29418/voltha-lib-go.git
12 % 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