Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bkonkle/go-garbage
Go Garbage collection examples
https://github.com/bkonkle/go-garbage
Last synced: about 1 month ago
JSON representation
Go Garbage collection examples
- Host: GitHub
- URL: https://github.com/bkonkle/go-garbage
- Owner: bkonkle
- Created: 2022-09-21T12:59:40.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-09-21T14:43:21.000Z (over 2 years ago)
- Last Synced: 2024-11-29T11:10:49.566Z (about 1 month ago)
- Language: Go
- Size: 17.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Go Garbage Collection Example
## Local Development
Install [air](https://github.com/cosmtrek/air) for live reloading:
```sh
go install github.com/cosmtrek/air@latest
```Use the "dev" command in the Makefile:
```sh
make dev
```### Generate Docs
Use the "docs" command in the Makefile to generate reference documentation for each package as a README.md file:
```sh
go install github.com/princjef/gomarkdoc/cmd/gomarkdoc@latest
make docs
```### Commit Hooks
Set up Git hooks to do things like generate docs automatically.
```sh
go install github.com/princjef/gomarkdoc/cmd/gomarkdoc@latest
make hooks
```### Linting
Lint with [golangci-lint](https://golangci-lint.run/):
```sh
make lint# Run lint with automatic fixes
make lint/fix
```### Testing
To run unit tests:
```sh
make test
```To test individual packagesm or an individual test within a package:
```sh
go test ./internal/handlers -v
go test ./internal/handlers -v -run="TestMemoryHandlers"
```For packages that use testify suites, to run an individual test in the suite:
```sh
go test ./internal/handlers -v
go test ./internal/handlers -v -run="TestMemoryHandlers" -testify.m "TestAllocateSuccess"
```