Go mod

From NovaOrdis Knowledge Base
Revision as of 21:54, 2 October 2023 by Ovidiu (talk | contribs) (Created page with "=Internal= * Go Tool =Overview= {{Internal|Go_Modules#go.mod|<tt>go.mod</tt>}} Initialize a v0 or v1 module: <syntaxhighlight lang='bash'> go mod init example....")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Internal

Overview

go.mod

Initialize a v0 or v1 module:

go mod init example.com/m

Initialize a v2 module:

go mod init example.com/m/v2

Inspect the code, look for module imports, download them and update go.mod.

go mod tidy