March 2020
Intermediate to advanced
406 pages
8h 39m
English
go list performs the action of listing named packages and modules, as well as displaying important build information about files, imports, and dependencies. The invocation stanza for go list is usage: go list [-f format] [-json] [-m] [list flags] [build flags] [packages].
Having access to the data structures that are the main pieces of the build process is powerful. We can use go list to find out a lot about the programs that we are building. For example, take the following simple program, which prints a message and computes a square root for the end user:
package mainimport ( "fmt" "math")func main() { fmt.Println("Hello Gophers") fmt.Println(math.Sqrt(64))}
If we want to find out about all the dependencies that we have for our particular ...
Read now
Unlock full access