You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-5Lines changed: 14 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -13,12 +13,15 @@ This is a GitHub repository template for Go. It has been created for ease-of-use
13
13
14
14
It includes:
15
15
16
-
-[Visual Studio Code](https://code.visualstudio.com) configuration with [Go](https://code.visualstudio.com/docs/languages/go) and [Remote Container](https://code.visualstudio.com/docs/remote/containers) support,
16
+
- continous integration via [GitHub Actions](https://github.com/features/actions),
17
+
- build automation via [Make](https://www.gnu.org/software/make),
17
18
- dependency management using [Go Modules](https://github.com/golang/go/wiki/Modules),
18
19
- linting with [golangci-lint](https://github.com/golangci/golangci-lint),
19
-
-build automation via [Make](https://www.gnu.org/software/make), [GitHub Actions](https://github.com/features/actions),
20
+
-unit testing with [race detector](https://blog.golang.org/race-detector) and [code covarage HTML report](https://blog.golang.org/cover),
20
21
- auto-tagging via [Github Tag Bump](https://github.com/marketplace/actions/github-tag-bump) GitHub Action,
21
-
- releasing using [GoReleaser](https://github.com/goreleaser/goreleaser).
22
+
- releasing using [GoReleaser](https://github.com/goreleaser/goreleaser),
23
+
- depdendencies scanning and vulnerabilities alerting thanks to [Dependabot](https://dependabot.com/go/),
24
+
-[Visual Studio Code](https://code.visualstudio.com) configuration with [Go](https://code.visualstudio.com/docs/languages/go) and [Remote Container](https://code.visualstudio.com/docs/remote/containers) support.
22
25
23
26
`Star` this repository if you find it valuable and worth maintaining.
24
27
@@ -34,14 +37,13 @@ It includes:
34
37
## Build
35
38
36
39
- Terminal: `make` to get help for make targets.
37
-
- Terminal: `make all` to execute a full build.
38
40
- Visual Studio Code: `Terminal` → `Run Build Task... (CTRL+ALT+B)` to execute a fast build.
39
41
40
42
## Release
41
43
42
44
The release workflow is triggered each time a tag with `v` prefix is pushed.
43
45
44
-
This repo uses [Github Tag Bump](https://github.com/marketplace/actions/github-tag-bump) for auto tagging on master branch. It automatically triggers the release workflow.
46
+
This repo uses [Github Tag Bump](https://github.com/marketplace/actions/github-tag-bump) for auto tagging on master branch. Therfore, it automatically triggers the release workflow as well.
45
47
46
48
- Add `#minor` to your commit message to bump minor version.
47
49
- Add `#major` to your commit message to bump major version. DANGER! Use it with caution and make sure you understand the consequences. More info: [Go Wiki](https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher), [Go Blog](https://blog.golang.org/v2-go-modules).
@@ -53,6 +55,7 @@ Remember to update Go version in [.github/workflows](.github/workflows), [Makefi
53
55
Notable files:
54
56
-[devcontainer.json](.devcontainer/devcontainer.json) - Visual Studio Code Remote Container configuration
@@ -70,6 +73,8 @@ You can always remove the [.devcontainer](.devcontainer) and [.vscode](.vscode)
70
73
### Why GitHub Actions, not any other CI server
71
74
72
75
GitHub Actions is out-of-the-box if you are already using GitHub.
76
+
[Here](https://github.com/mvdan/github-actions-golang) you can learn how to use it for Go.
77
+
73
78
However, changing to any other CI server should be very simple, because this repository has build logic and tooling installation in Makefile.
74
79
75
80
You can also use the `docker` make target to run the build using a docker container.
@@ -113,6 +118,10 @@ release:
113
118
114
119
Alternativly you can completly remove the usage of GoReleaser if you prefer handcrafted release notes.
115
120
121
+
### Why the code coverage results are not accurate
122
+
123
+
By default `go test` records code coverage for the package that is currently tested. If you want to get more accurate (cross-package) coverage, then consider using [go-acc](https://github.com/ory/go-acc). [Read more](https://www.ory.sh/golang-go-code-coverage-accurate/).
0 commit comments