An import path is a string used to import a package. A package's
import path is its module path joined with its subdirectory within the module.
For example, the module github.com/google/go-cmp
contains a package
in the directory cmp/
. That package's import path is
github.com/google/go-cmp/cmp
. Packages in the standard library do
not have a module path prefix.
If you want to change selection, open document below and click on "Move attachment"
How to Write Go Code - The Go Programming Language look to download it. For example, in order to download the module golang.org/x/tools, the go command would consult the repository indicated by https://golang.org/x/tools (described more here). <span>An import path is a string used to import a package. A package's import path is its module path joined with its subdirectory within the module. For example, the module github.com/google/go-cmp contains a package in the directory cmp/. That package's import path is github.com/google/go-cmp/cmp. Packages in the standard library do not have a module path prefix. Your first program To compile and run a simple program, first choose a module path (we'll use example/user/hello) and create a go.mod file that declares it: $ mkdir hello # Alternativel Summary
status | not read | | reprioritisations | |
---|
last reprioritisation on | | | suggested re-reading day | |
---|
started reading on | | | finished reading on | |
---|
Details