File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -43,10 +43,10 @@ lint:
4343 ./scripts/lint.sh
4444
4545test :
46- go test -v -race -cover $(PKGS )
46+ CGO_ENABLED=1 go test -v -race -cover $(PKGS )
4747
4848test-coverage :
49- go test -coverprofile=coverage.out $(PKGS )
49+ CGO_ENABLED=1 go test -coverprofile=coverage.out $(PKGS )
5050 go tool cover -func=coverage.out
5151 go tool cover -html=coverage.out -o coverage.html
5252
Original file line number Diff line number Diff line change 1+ #! /bin/bash -e
2+
3+ while getopts i: flag
4+ do
5+ case " ${flag} " in
6+ i) INPUT_DIR=${OPTARG} ;;
7+ esac
8+ done
9+
10+ while getopts i: flag
11+ do
12+ case " ${flag} " in
13+ i) INPUT_DIR=${OPTARG} ;;
14+ esac
15+ done
16+
17+ go run golang.org/x/tools/cmd/goimports@latest -w $INPUT_DIR || { echo " Failed to clean imports in $INPUT_DIR " ; exit 1; }
18+
19+ echo " Import cleaning completed."
You can’t perform that action at this time.
0 commit comments