undefined: strings.CutPrefix
Hanoboo opened this issue · comments
When I executed the install command an error was returned, but my go version was greater than the required 1.18.
-
Installation command
go install github.com/cloudflare/cfssl/cmd/...@latest
-
Error message
# github.com/prometheus/common/model
go/pkg/mod/github.com/prometheus/common@v0.48.0/model/metric.go:363:33: undefined: strings.CutPrefix
note: module requires Go 1.20
anyone has answer for this issue? i did reinstall go 1.20 version
The problem when i try to build an image of my app to extract some metric and this happend in build binary step
So i think in your Dockerfile you need to change to golang image version:
and you may need to change your system go version to >= 1.20
by doing:
Go to this link: https://go.dev/dl/
scroll down you will see:
click on that, scroll down to 1.20
you may dont need to change the go system version, only need to change 1 line in Dockerfile to 1.20