-
Notifications
You must be signed in to change notification settings - Fork 904
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #732 from ESonata/update-aliases
update import-aliases
- Loading branch information
Showing
39 changed files
with
264 additions
and
251 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,12 +12,24 @@ temp_path=$(mktemp -d) | |
pushd "${temp_path}" >/dev/null | ||
cp "${ROOT_PATH}"/go.mod . | ||
GO111MODULE=on go get "k8s.io/kubernetes/cmd/[email protected]" | ||
GO111MODULE=on go get "golang.org/x/tools/cmd/[email protected]" | ||
popd >/dev/null | ||
|
||
IMPORT_ALIASES_PATH="${ROOT_PATH}/hack/.import-aliases" | ||
INCLUDE_PATH="(${ROOT_PATH}/cmd|${ROOT_PATH}/test/e2e|${ROOT_PATH}/test/helper|\ | ||
${ROOT_PATH}/pkg/apis|${ROOT_PATH}/pkg/clusterdiscovery|${ROOT_PATH}/pkg/controllers|\ | ||
${ROOT_PATH}/pkg/estimator|${ROOT_PATH}/pkg/karmadactl|${ROOT_PATH}/pkg/scheduler|\ | ||
${ROOT_PATH}/pkg/clusterdiscovery|${ROOT_PATH}/pkg/controllers|\ | ||
${ROOT_PATH}/pkg/estimator/server|${ROOT_PATH}/pkg/karmadactl|${ROOT_PATH}/pkg/scheduler|\ | ||
${ROOT_PATH}/pkg/util|${ROOT_PATH}/pkg/version|${ROOT_PATH}/pkg/webhook)" | ||
|
||
preferredimports -confirm -import-aliases "${IMPORT_ALIASES_PATH}" -include-path "${INCLUDE_PATH}" "${ROOT_PATH}" | ||
|
||
len=${#INCLUDE_PATH} | ||
INCLUDE_PATH=${INCLUDE_PATH:1:len-2} | ||
|
||
IFS="|" read -r -a array <<< "${INCLUDE_PATH}" | ||
for var in "${array[@]}" | ||
do | ||
echo "Sorting importing in file" "${var}" | ||
goimports -local "github.com/karmada-io/karmada" -w "${var}" | ||
done | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.