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:
43
43
./scripts/lint.sh
44
44
45
45
test :
46
- go test -v -race -cover $(PKGS )
46
+ CGO_ENABLED=1 go test -v -race -cover $(PKGS )
47
47
48
48
test-coverage :
49
- go test -coverprofile=coverage.out $(PKGS )
49
+ CGO_ENABLED=1go test -coverprofile=coverage.out $(PKGS )
50
50
go tool cover -func=coverage.out
51
51
go tool cover -html=coverage.out -o coverage.html
52
52
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