Go: Difference between revisions
Appearance
NickPGSmith (talk | contribs) No edit summary |
NickPGSmith (talk | contribs) No edit summary |
||
| Line 1: | Line 1: | ||
== | == Building and Packages == | ||
go run test.go | go run test.go | ||
| Line 6: | Line 6: | ||
gofmt -w . | gofmt -w . | ||
gofmt -d test.go | gofmt -d test.go | ||
=== Useful Packages == | |||
Initialise project, create go.mod file: | |||
go mod init example-project | |||
Download, and add reference to go.mod file: | |||
go get github.com/alexflint/go-arg | |||
Ensure go.mod is in sync with code imports: | |||
go mod tidy | |||
Note the go.sum file that contains anti-tampering checksums. | |||
* [https://github.com/alexflint/go-arg alexflint/go-arg] | |||
* ? | |||
Revision as of 08:38, 23 January 2026
Building and Packages
go run test.go go build test.go gofmt -w . gofmt -d test.go
= Useful Packages
Initialise project, create go.mod file:
go mod init example-project
Download, and add reference to go.mod file:
go get github.com/alexflint/go-arg
Ensure go.mod is in sync with code imports:
go mod tidy
Note the go.sum file that contains anti-tampering checksums.