blog

SEAN K.H. LIAO

list

The "I know it lists things but I don't remember what" command.

reference repo: erred/go-list-ex

dependency graph

This is everything:

graph of everything

module mode

listing modules

go list -m
go list -m
go list -m all
go list -m all

package mode

go list ./...
go list ./...
go list -deps ./...
go list -deps ./...
go list -deps -test ./...
go list -deps -test ./...
go list all

all changed meaning between 1.15 and 1.16

go1.16+
1.16 go list all
go1.15 or earlier
1.15 go list all