Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tethik/go-template
https://github.com/tethik/go-template
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/tethik/go-template
- Owner: Tethik
- Created: 2023-11-16T15:45:50.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2023-11-16T18:12:35.000Z (12 months ago)
- Last Synced: 2024-10-11T08:26:48.692Z (27 days ago)
- Language: Go
- Size: 11.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Go template
My own minimalist template for setting up a new Go project.
## Setup 🚀
- [ ] Besides the standard go tooling, ensure you have [goreleaser](https://goreleaser.com/) and `make` installed
- [ ] Copy the template (e.g. via github)
- [ ] Modify default code. Find and replace `github.com/Tethik/go-template`. Rename `example`.
- [ ] Modify `main: ./cmd/example/example.go` and `binary: app` in `.goreleaser.yaml`### Github release workflow
Ensure you set `Actions -> Workflow permissions` to `Read and write permissions`
## Usage 🧑💻
- `make` or `make single-build` - build for just your arch. Outputs in `dist/`.
- `make build` - to build for all archs
- `make test` - to run tests### Releases
To create a new release:
```sh
git tag -a vX.Y.Z # set your semantic version here
git push origin vX.Y.Z
```Alternatively you can a manual release via make (not tested tbh)
`make release`
### References 📜
- [Repo by @nobe4 which this steals a bunch from](https://github.com/nobe4/safe)
- [Golang Standards Project Layout](https://github.com/golang-standards/project-layout)