8000
@hebingchang can you put more detail and tools you have tried .w.
Actually you can use golist with template https://dave.cheney.net/2014/09/14/go-list-your-swiss-army-knife
go list -f '{{ join .Deps "\n"}}' .
https://pkg.go.dev/golang.org/x/tools/go/packages?tab=doc and https://github.com/golang/example/tree/master/gotypes could be useful
https://golang.org/cmd/go/#hdr-Explain_why_packages_or_modules_are_needed
Also you can use the command go mod why -m github.com/foo/boar and it will prints the import order
go mod why -m github.com/foo/boar
$ go mod why -m github.com/pingcap/tipb # github.com/pingcap/tipb github.com/at15/gegecece/impl/gce4-go/parser/pingcap github.com/pingcap/parser github.com/pingcap/parser/model github.com/pingcap/tipb/go-tipb
Activity
at15 commentedon Apr 4, 2020
@hebingchang can you put more detail and tools you have tried .w.
at15 commentedon Apr 4, 2020
Actually you can use golist with template https://dave.cheney.net/2014/09/14/go-list-your-swiss-army-knife
go list -f '{{ join .Deps "\n"}}' .hebingchang commentedon Apr 4, 2020
at15 commentedon Apr 30, 2020
https://pkg.go.dev/golang.org/x/tools/go/packages?tab=doc and https://github.com/golang/example/tree/master/gotypes could be useful
at15 commentedon May 20, 2020
https://golang.org/cmd/go/#hdr-Explain_why_packages_or_modules_are_needed
at15 commentedon Aug 6, 2020
Also you can use the command
go mod why -m github.com/foo/boarand it will prints the import order$ go mod why -m github.com/pingcap/tipb # github.com/pingcap/tipb github.com/at15/gegecece/impl/gce4-go/parser/pingcap github.com/pingcap/parser github.com/pingcap/parser/model github.com/pingcap/tipb/go-tipb