mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-06 11:42:14 +00:00
KUBE_EXTRA_GOPATH to append to the GOPATH
So you can add your own package to the GOPATH outside of the kube tree
This commit is contained in:
@@ -105,8 +105,13 @@ kube::setup_go_environment() {
|
||||
fi
|
||||
fi
|
||||
|
||||
GOPATH=${KUBE_TARGET}
|
||||
# Append KUBE_EXTRA_GOPATH to the GOPATH if it is defined.
|
||||
if [[ -n ${KUBE_EXTRA_GOPATH:-} ]]; then
|
||||
GOPATH=${GOPATH}:${KUBE_EXTRA_GOPATH}
|
||||
fi
|
||||
# Set GOPATH to point to the tree maintained by `godep`.
|
||||
GOPATH="${KUBE_TARGET}:${KUBE_REPO_ROOT}/Godeps/_workspace"
|
||||
GOPATH="${GOPATH}:${KUBE_REPO_ROOT}/Godeps/_workspace"
|
||||
export GOPATH
|
||||
|
||||
# Unset GOBIN in case it already exists in the current session.
|
||||
|
Reference in New Issue
Block a user