On Thu, Sep 5, 2019 at 4:33 AM t hepudds <thepudds1...@gmail.com> wrote:

> To upgrade your direct dependencies to their latest release (with your
> indirect dependencies using versions selected based on the requirements of
> your direct dependencies), this should work in most cases:
>
>   go get $(go list -f '{{if not (or .Main .Indirect)}}{{.Path}}{{end}}' -m
> all)
>
Thank you for this shorter solution and its GitHub issue.
To run it on any module (including modules without dependencies and with no
.go files in the module root) this checks that the list of dependencies
isn't empty:

go list -f '{{if not (or .Main .Indirect)}}{{.Path}}{{end}}' -m all | xargs
--no-run-if-empty go get

Then my remaining question is: How to find out if one of my dependencies
has a newer major version?
Is there, or should there be, a way using the standard tools to query for
this?
I found a couple of GitHub issues about upgrading to /v2+ (like changing
the /vN import suffix automatically) once the user knows about a new major
version. But I didn't find an issue about discovering that there is a new
major version without manually checking.

Regards,
Mihai

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAMXRBmgsS_qzJoT6fFd%3D%2Baag9bh%3DnXp6WrFtSY_05WDUOyxf8A%40mail.gmail.com.

Reply via email to