Files
kustomize/hack/doGoMod.sh
2022-04-04 14:24:04 -04:00

14 lines
277 B
Bash
Executable File

# Copyright 2022 The Kubernetes Authors.
# SPDX-License-Identifier: Apache-2.0
# Usage: From repo root:
# ./hack/doGoMod.sh tidy
# ./hack/doGoMod.sh verify
operation=$1
for f in $(find ./ -name 'go.mod'); do
echo $f
d=$(dirname "$f")
(cd $d; go mod $operation)
done