Closed zchee closed 4 years ago
Hmm, but why still fetched mvdan.cc/xurls v1.1.0
?
Should I also revert follows means add canonical import comment?
$ go version
go version devel +4f75717954 Fri Dec 27 06:01:32 2019 +0000 darwin/amd64
$ cd $(mktemp -d); go mod init tmp; GO111MODULE=on go get mvdan.cc/xurls/v2/cmd/xurls
go: creating new go.mod: module tmp
go: downloading mvdan.cc/xurls v1.1.0 # this line
go: finding versions for mvdan.cc/xurls/v2/cmd/xurls
go: finding versions for mvdan.cc/xurls/v2/cmd
go: found mvdan.cc/xurls/v2/cmd/xurls in mvdan.cc/xurls/v2 v2.1.0
$ pwd
/var/folders/path/to/mktmp
$ cat go.mod
module tmp
go 1.14
require mvdan.cc/xurls/v2 v2.1.0 // indirect
$ cat go.sum
mvdan.cc/xurls v1.1.0 h1:kj0j2lonKseISJCiq1Tfk+iTv65dDGCl0rTbanXJGGc=
mvdan.cc/xurls/v2 v2.1.0 h1:KaMb5GLhlcSX+e+qhbRJODnUUBvlw01jt4yrjFIHAuA=
mvdan.cc/xurls/v2 v2.1.0/go.mod h1:5GrSd9rOnKOpZaji1OZLYL/yeAAtGDlo/cFe+8K5n8E=
Hm. Not sure why it fetched v1 there. I don't have the time to investigate right now, but if you do, I'd be interested to see what you can find.
Thanks for the patch, in any case! Go 1.10 is indeed not relevant anymore.
Add
/v2
suffix forxurls
command should fetch from themvdan.cc/xurls/v2
module root. Actually, revert 795eb0c58b17f3db55c9b06d4a5bbc753199858a because the no longer supports Go version 1.11 and earlier on e21d637d7b83784a55a9ad577f035e72d72fa927. (Also said Requires Go 1.12 or later. on follows.)Also, like mvdan/gofumpt, switch to use
mktmp
way.