Difference between revisions of "Go mod"

From wikieduonline
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{lowercase}}
 
{{lowercase}}
 
+
* https://go.dev/ref/mod
 
  [[go mod init]]
 
  [[go mod init]]
 
  [[go mod download]]
 
  [[go mod download]]
Line 7: Line 7:
 
  [[go mod why]]
 
  [[go mod why]]
 
  [[go mod tidy]]
 
  [[go mod tidy]]
 +
[[go help mod]]
 +
  
  
 
Execute:
 
Execute:
 
  [[go mod init]] YOUR_NAME
 
  [[go mod init]] YOUR_NAME
  go: creating new go.mod: module YOUR_NAME
+
  go: creating new [[go.mod]]: module YOUR_NAME
  
 
It will create a <code>[[go.mod]]</code> file containing
 
It will create a <code>[[go.mod]]</code> file containing
Line 20: Line 22:
 
</pre>
 
</pre>
  
[[go help mod]]
+
== Related ==
 
+
* <code>[[GOPATH]]</code>
  
 
== See also ==
 
== See also ==

Latest revision as of 08:47, 3 July 2024

go mod init
go mod download
go mod vendor
go mod verify
go mod why
go mod tidy
go help mod


Execute:

go mod init YOUR_NAME
go: creating new go.mod: module YOUR_NAME

It will create a go.mod file containing

 module YOUR_NAME

 go 1.14

Related[edit]

See also[edit]

Advertising: