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
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With