Merge pull request #10410 from rifelpet/hack-tools

hack/goimports - Replace mapfile with read
This commit is contained in:
Kubernetes Prow Robot 2020-12-11 07:01:24 -08:00 committed by GitHub
commit 3a7d728849
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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[@]}"

View File

@ -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[@]}")