I've tried to Build kperf by running build.sh, but I get The following error with unable to find io/fs. I'm a huge go noob, any help appreciated.
ibrahim@home:~/kperf/src/knative.dev/kperf$ ./hack/build.sh
⚖️ License
🧹 Format
🚧 Compile
knative.dev/kperf/pkg/config imports
github.com/spf13/viper imports
io/fs: cannot find module providing package io/fs
-mod=mod not supported (can be '', 'readonly', or 'vendor')
/home/ibrahim/kperf/src/knative.dev/kperf/hack/build-funcs.sh: line 44: go-bindata: command not found
-mod=mod not supported (can be '', 'readonly', or 'vendor')
🧪 Test
knative.dev/kperf/pkg/config imports
github.com/spf13/viper imports
io/fs: cannot find module providing package io/fs
-mod=mod not supported (can be '', 'readonly', or 'vendor')
/home/ibrahim/kperf/src/knative.dev/kperf/hack/build-funcs.sh: line 44: go-bindata: command not found
build io/fs: cannot load io/fs: open /home/ibrahim/kperf/src/knative.dev/kperf/vendor/io/fs: no such file or directory
🔥 Failure
The error message means that your Go tool
-mod=mod
(module support was introduced as an experimental feature in Go1.11).io/fs
(which was added in Go1.16).That indicates the Go tool installed on your system is too old.
According to the go directive in the go.mod file, I think you should upgrade to Go1.18 at least.
module knative.dev/kperf
go 1.18
It's better to install the latest Go. See https://go.dev/doc/install for the installation instructions.