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
This is a GitHub repository template for Go. It has been created for ease-of-use for anyone who wants to:
10
11
@@ -18,7 +19,7 @@ It includes:
18
19
- dependency management using [Go Modules](https://github.com/golang/go/wiki/Modules),
19
20
- code formatting using [gofumpt](https://github.com/mvdan/gofumpt),
20
21
- linting with [golangci-lint](https://github.com/golangci/golangci-lint),
21
-
- unit testing with [testify](https://github.com/stretchr/testify), [race detector](https://blog.golang.org/race-detector) and [code covarage HTML report](https://blog.golang.org/cover),
22
+
- unit testing with [testify](https://github.com/stretchr/testify), [race detector](https://blog.golang.org/race-detector), code covarage [HTML report](https://blog.golang.org/cover) and [Codecov report](https://codecov.io/),
22
23
- releasing using [GoReleaser](https://github.com/goreleaser/goreleaser),
23
24
- dependencies scanning and updating thanks to [Dependabot](https://dependabot.com),
24
25
-[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.
@@ -29,9 +30,10 @@ It includes:
29
30
30
31
## Usage
31
32
33
+
1. Sign up on [Codecov](https://codecov.io/) and configure [Codecov GitHub Application](https://github.com/apps/codecov) for all repositories.
32
34
1. Click the `Use this template` button (alt. clone or download this repository).
33
35
1. Replace all occurences of `golang-templates/seed` to `your_org/repo_name` in all files.
34
-
1. Rename folder `cmd/seed` to `cmd/repo_name` and update [.goreleaser.yml](.goreleaser.yml).
36
+
1. Rename folder `cmd/seed` to `cmd/app_name` and update [.goreleaser.yml](.goreleaser.yml) accordingly.
35
37
1. Update [LICENSE](LICENSE) and [README.md](README.md).
36
38
37
39
## Build
@@ -77,15 +79,11 @@ However, changing to any other CI server should be very simple, because this rep
77
79
78
80
You can also use the `docker` make target to run the build using a docker container.
79
81
80
-
### How can I use Make on Windows
82
+
### How can I build on Windows
81
83
82
-
Use [WSL (Windows Subsystem for Linux)](https://docs.microsoft.com/en-us/windows/wsl/install-win10).
83
-
Alternatively install [tdm-gcc](https://jmeubank.github.io/tdm-gcc/) and [Make Windows port](https://gist.github.com/evanwill/0207876c3243bbb6863e65ec5dc3f058).
84
-
85
-
### How can I create a Docker image, deb/rpm/snap package, Homebrew Tap, Scoop App Manifest etc.
86
-
87
-
Take a look at GoReleaser [docs](https://goreleaser.com/customization/) as well as [its repo](https://github.com/goreleaser/goreleaser/) how it is dogfooding its functionality.
84
+
Install [tdm-gcc](https://jmeubank.github.io/tdm-gcc/) and add an alias in `~/.bashrc`: `alias make='mingw32-make.exe'`
88
85
86
+
Alternatively use [WSL (Windows Subsystem for Linux)](https://docs.microsoft.com/en-us/windows/wsl/install-win10) or develop inside a [Remote Container](https://code.visualstudio.com/docs/remote/containers).
89
87
90
88
### How can I create an application installation script
curl -sSfL https://raw.githubusercontent.com/your_org/repo_name/master/install.sh | sh -s -- -b /usr/local/bin
104
102
```
105
103
104
+
### How can I create a Docker image, deb/rpm/snap package, Homebrew Tap, Scoop App Manifest etc.
105
+
106
+
Take a look at GoReleaser [docs](https://goreleaser.com/customization/) as well as [its repo](https://github.com/goreleaser/goreleaser/) how it is dogfooding its functionality.
107
+
106
108
### How can I create a library instead of an application
107
109
108
110
You can change the [.goreleaser.yml](.goreleaser.yml) to contain:
@@ -121,32 +123,6 @@ Alternatively, you can completly remove the usage of GoReleaser if you prefer ha
121
123
122
124
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/).
123
125
124
-
### How to integrate with Codecov
125
-
126
-
1. Sing up on [Codecov](https://codecov.io/) and setup your repository.
127
-
1. Additionally consider configuring [Codecov GitHub Application](https://github.com/apps/codecov) for better integration.
128
-
1. Add [codecov-action](https://github.com/codecov/codecov-action) to [.github/workflows/build.yml](.github/workflows/build.yml):
0 commit comments