linux go install
-
apt update
-
apt upgrade
-
apt install golang-go
-
vim ~/.profile export GOPATH=$HOME/go export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
-
source ~/.profile
-
go version -> go version go1.20.3 linux/amd64
-
install go lib
- go mod init example.com/hello
- go get k8s.io/client-go/kubernetes
- go get k8s.io/client-go/rest
- go get k8s.io/client-go/[email protected]
- go get github.com/prometheus/common/model
- go get github.com/prometheus/common/expfmt