Reputation: 31
When I run go build, there is always an error:
go: finding github.com/shirou/gopsutil v2.19.6+incompatible
go list -m: github.com/shirou/[email protected]+incompatible: invalid version: +incompatible suffix not allowed: module contains a go.mod file, so semantic import versioning is required
How can I fix it?
I use go mod and go version 1.13.5
Upvotes: 3
Views: 6754
Reputation: 624
After go 1.13, new validation has been added.
This is new validation in 1.13
see Version validation
in https://golang.org/doc/go1.13 for details.
To fix this, go down to version 1.13,
or
Changed go.mod
to add v2
in module module github.com/shirou/gopsutil
-> module github.com/shirou/gopsutil/v2
here is link detail
Upvotes: 1