Get rid of most references to GOPATH

Kubernetes-commit: 10c32b3e2f4345dab582270b1a202dcd92dabd34
This commit is contained in:
Tim Hockin
2024-01-03 17:14:38 -08:00
committed by Kubernetes Publisher
parent f1ec2cd017
commit b0062217a2

View File

@@ -79,14 +79,8 @@ go get k8s.io/client-go@v0.20.4
### Go modules disabled
If you get a message like `cannot use path@version syntax in GOPATH mode`,
you likely do not have go modules enabled.
Dependency management tools are built into go 1.11+ in the form of
[go modules](https://github.com/golang/go/wiki/Modules).
These are used by the main Kubernetes repo (>= `v1.15.0`) and
`client-go` (>= `kubernetes-1.15.0`) to manage dependencies.
If you are using go 1.11 or 1.12 and are working with a project located within `$GOPATH`,
you must opt into using go modules:
you likely do not have go modules enabled. This should be on by default in all
supported versions of Go.
```sh
export GO111MODULE=on