mirror of https://github.com/kubernetes/kops.git
Merge pull request #10410 from rifelpet/hack-tools
hack/goimports - Replace mapfile with read
This commit is contained in:
commit
3a7d728849
|
|
@ -26,6 +26,6 @@ go build -o "${TOOLS_BIN}/goimports" golang.org/x/tools/cmd/goimports
|
|||
|
||||
cd "${KOPS_ROOT}" || exit 1
|
||||
|
||||
mapfile -t files < <(find . -type f -name '*.go' -not -path "./vendor/*")
|
||||
IFS=$'\n' read -r -d '' -a files < <( find . -type f -name '*.go' -not -path "./vendor/*" && printf '\0' )
|
||||
|
||||
"${TOOLS_BIN}/goimports" -w "${files[@]}"
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ go build -o "${TOOLS_BIN}/goimports" golang.org/x/tools/cmd/goimports
|
|||
|
||||
cd "${KOPS_ROOT}" || exit 1
|
||||
|
||||
mapfile -t files < <(find . -type f -name '*.go' -not -path "./vendor/*")
|
||||
IFS=$'\n' read -r -d '' -a files < <( find . -type f -name '*.go' -not -path "./vendor/*" && printf '\0' )
|
||||
|
||||
output=$("${TOOLS_BIN}/goimports" -l "${files[@]}")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue