File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 27
27
./hack/cherry_pick_pull.sh
28
28
./hack/ginkgo-e2e.sh
29
29
./hack/grab-profiles.sh
30
- ./hack/lib/golang.sh
31
30
./hack/lib/init.sh
32
31
./hack/lib/swagger.sh
33
32
./hack/lib/test.sh
Original file line number Diff line number Diff line change 372
372
373
373
# Ensure the go tool exists and is a viable version.
374
374
kube::golang::verify_go_version () {
375
- if [[ -z " $( which go) " ]]; then
375
+ if [[ -z " $( command -v go) " ]]; then
376
376
kube::log::usage_from_stdin << EOF
377
377
Can't find 'go' in PATH, please fix and retry.
378
378
See http://golang.org/doc/install for installation instructions.
@@ -693,6 +693,10 @@ kube::golang::build_binaries() {
693
693
host_platform=$( kube::golang::host_platform)
694
694
695
695
local goflags goldflags goasmflags gogcflags
696
+ # If GOLDFLAGS is unset, then set it to the a default of "-s -w".
697
+ # Disable SC2153 for this, as it will throw a warning that the local
698
+ # variable goldflags will exist, and it suggest changing it to this.
699
+ # shellcheck disable=SC2153
696
700
goldflags=" ${GOLDFLAGS=-s -w} $( kube::version::ldflags) "
697
701
goasmflags=" -trimpath=${KUBE_ROOT} "
698
702
gogcflags=" ${GOGCFLAGS:- } -trimpath=${KUBE_ROOT} "
You can’t perform that action at this time.
0 commit comments