procfs
procfs copied to clipboard
Update build constraints for loong64 and s390x, Compatible with lower versions of go compiler
go1.16 cannot recognize the loong64 instruction set architecture, and an error will occur during compilation. This MR explicitly specifies the instruction set build constraints in the source file.
When running on linux/amd64, got the following error
❯ gvm use go1.16
Now using version go1.16
❯ go build -o main main.go
# github.com/prometheus/procfs
vendor/github.com/prometheus/procfs/cpuinfo_x86.go:20:5: parseCPUInfo redeclared in this block
previous declaration at vendor/github.com/prometheus/procfs/cpuinfo_loong64.go:19:5
Not sure we want/need to support go 1.16. Why do you need to compile it with that old version? @SuperQ wdyt?
As of today this library requires Go 1.20 and newer.