From 12eac51beafb23e225a5e486c056626386672c60 Mon Sep 17 00:00:00 2001
From: Steve Traut go mod init command,
giving it the name of the module your code will be in. The name is the
- module's module path. In most cases, this will be the repository
- location where your source code will be kept, such as
- github.com/mymodule. If you plan to publish your module
- for others to use, the module path must be a location from
- which Go tools can download your module.
+ module's module path.
In actual development, the module path will typically be the repository
+ location where your source code will be kept. For example, the module
+ path might be github.com/mymodule. If you plan to publish
+ your module for others to use, the module path must be a
+ location from which Go tools can download your module. For more about
+ naming a module with a module path, see
+ Managing
+ dependencies.
For the purposes of this tutorial, just use
- example.com/hello.
+ example/hello.
-$ go mod init example.com/hello -go: creating new go.mod: module example.com/hello +$ go mod init example/hello +go: creating new go.mod: module example/hello-- cgit v1.3-6-g1900