google / addlicense

A program which ensures source code files have copyright license headers by scanning directory patterns recursively
Apache License 2.0
724 stars 169 forks source link

malformed module path "io/fs" #110

Closed nextfour-back-sabina closed 2 years ago

nextfour-back-sabina commented 2 years ago

I used the command:

go get github.com/google/addlicense@v1.0.0

And the download started. However, it was interrupted by thiss error message:
build github.com/google/addlicense: cannot load io/fs: malformed module path "io/fs": missing dot in first path element

This is the whole download:

$ go get github.com/google/addlicense@v1.0.0
go: finding github.com v1.0.0
go: finding github.com/google v1.0.0
go: downloading github.com/bmatcuk/doublestar/v4 v4.0.2
go: downloading golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e
go: extracting golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e
go: extracting github.com/bmatcuk/doublestar/v4 v4.0.2
go: finding golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e
go: finding github.com/bmatcuk/doublestar/v4 v4.0.2
build github.com/google/addlicense: cannot load io/fs: malformed module path "io/fs": missing dot in first path element
willnorris commented 2 years ago

What version of go are you using? addlicense requires go1.16, which is when the io/fs package was added.

willnorris commented 2 years ago

I'm assuming this is simply a go versioning issue. If its something else, please feel free to provide more info.