What makes a standard package distinguishable from an external package? The lack of "github", "Bitbucket" etc. in its specifier?The commandgo list -f {{.Deps}}
list all dependencies. It should be easy to pipe the output through a filter to remove standard packages.
--
You received this message because you are subscribed to a topic in the Google Groups "golang-nuts" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-nuts/611QEJqkDKw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
nice!
$ go list -f '{{.Deps}}' | tr "[" " " | tr "]" " " | xargs go list -f
'{{if not .Standard}}{{.ImportPath}}{{end}}'
$ go list -f '{{join .Deps "\n"}}' | xargs go list -f '{{if not .Standard}}{{.ImportPath}}{{end}}'
A few months back I made a tiny tool to do exactly this.You can just 'go get github.com/cespare/deplist' and then 'deplist github.com/your/package' or whatever.