Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/briansorahan/death
A tiny package that catalogs the myriad ways you might want to kill a Go program.
https://github.com/briansorahan/death
Last synced: 18 days ago
JSON representation
A tiny package that catalogs the myriad ways you might want to kill a Go program.
- Host: GitHub
- URL: https://github.com/briansorahan/death
- Owner: briansorahan
- Created: 2018-02-19T21:17:58.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-07T14:56:08.000Z (about 6 years ago)
- Last Synced: 2024-06-20T06:38:01.016Z (5 months ago)
- Language: Go
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# death
Package death provides some functions that I find myself writing over and over again in Go programs.
## Install
```
go get -u github.com/briansorahan/death
```## Usage
### In func main
This is not working code, but should serve to illustrate how I expect `Main` to be used:
```
package mainimport (
"github.com/briansorahan/death"
)func main() {
cli, err := NewCLI()death.Main(err)
death.Main(cli.Run(context.Background()))
}
```### In testing
```
package mypkgimport (
"testing""github.com/briansorahan/death"
)func TestMyFunc(t *testing.T) {
die := death.By(t)die(MyFunc())
}
```