File tree Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -10,17 +10,14 @@ See [blog post](https://dev.to/vearutop/peace-of-mind-with-github-actions-for-a-
10
10
11
11
Run this command in your repo root.
12
12
```
13
- curl https://raw.githubusercontent.com/bool64/dev/master/makefiles/base.mk -sLo Makefile && printf "//go:build ignore\n// +build ignore\n\npackage $(go list -f '{{.Name}}' || echo 'mypackage')_test\n\nimport _ \"github.com/bool64/dev\" // Include CI/Dev scripts to project.\n" > dev_test.go && make reset-ci
13
+ curl https://raw.githubusercontent.com/bool64/dev/master/makefiles/base.mk -sLo Makefile && printf "package $(go list -f '{{.Name}}' || echo 'mypackage')_test\n\nimport _ \"github.com/bool64/dev\" // Include CI/Dev scripts to project.\n" > dev_test.go && make reset-ci
14
14
```
15
15
16
16
### Manual
17
17
18
18
Add a test file (e.g. ` dev_test.go ` ) to your module with unused import.
19
19
20
20
``` go
21
- // go:build ignore
22
- // +build ignore
23
-
24
21
package mymodule_test
25
22
26
23
import _ " github.com/bool64/dev" // Include development helpers to project.
Original file line number Diff line number Diff line change @@ -7,10 +7,7 @@ reset-ci: github-actions
7
7
@cp $(DEVGO_PATH ) /makefiles/base.mk Makefile; chmod +w Makefile; git add Makefile
8
8
@cp $(DEVGO_PATH ) /scripts/.golangci.yml .golangci.yml; chmod +w .golangci.yml; git add .golangci.yml
9
9
@cp $(DEVGO_PATH ) /scripts/.gitignore .gitignore; chmod +w .gitignore; git add .gitignore
10
- @echo " //go:build ignore" > dev_test.go
11
- @echo " // +build ignore" >> dev_test.go
12
- @echo " " >> dev_test.go
13
- @echo " package $( shell go list -f ' {{.Name}}' ) _test" >> dev_test.go
10
+ @echo " package $( shell go list -f ' {{.Name}}' ) _test" > dev_test.go
14
11
@echo " " >> dev_test.go
15
12
@echo ' import _ "github.com/bool64/dev" // Include CI/Dev scripts to project.' >> dev_test.go
16
13
@git add dev_test.go
You can’t perform that action at this time.
0 commit comments