Skip to content

Commit e9bd3e3

Browse files
committed
merge from master
2 parents 8b60533 + 861685f commit e9bd3e3

File tree

3 files changed

+19
-17
lines changed

3 files changed

+19
-17
lines changed

README.md

+15-13
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
1-
# Death [![Build Status](https://travis-ci.org/vrecan/death.svg?branch=master)](https://travis-ci.org/vrecan/death) [![Coverage Status](https://coveralls.io/repos/github/vrecan/death/badge.svg?branch=master)](https://coveralls.io/github/vrecan/death?branch=master)
1+
# Death [![Build Status](https://travis-ci.org/vrecan/death.svg?branch=master)](https://travis-ci.org/vrecan/death) [![Coverage Status](https://coveralls.io/repos/github/vrecan/death/badge.svg?branch=master)](https://coveralls.io/github/vrecan/death?branch=master) [![Go Reference](https://pkg.go.dev/badge/github.com/vrecan/death.svg)](https://pkg.go.dev/github.com/vrecan/death) [![Join the chat at https://gitter.im/vrecan/death](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/vrecan/death?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
22

3-
[![Join the chat at https://gitter.im/vrecan/death](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/vrecan/death?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
43
<p>Simple library to make it easier to manage the death of your application.</p>
54

65
## Get The Library
76

87
Use gopkg.in to import death based on your logger.
98

10-
Version | Go Get URL | source | doc | Notes |
11-
--------|------------|--------|-----|-------|
12-
3.x | [gopkg.in/vrecan/death.v3](https://gopkg.in/vrecan/death.v3)| [source](https://github.com/vrecan/death/tree/v3.0) | [doc](https://godoc.org/gopkg.in/vrecan/death.v3) | This removes the need for an independent logger. By default death will not log but will return an error if all the closers do not properly close. If you want to provide a logger just satisfy the deathlog.Logger interface.
13-
2.x | [gopkg.in/vrecan/death.v2](https://gopkg.in/vrecan/death.v2)| [source](https://github.com/vrecan/death/tree/v2.0) | [doc](https://godoc.org/gopkg.in/vrecan/death.v2) | This supports loggers who _do not_ return an error from their `Error` and `Warn` functions like [logrus](https://github.com/sirupsen/logrus)
14-
1.x | [gopkg.in/vrecan/death.v1](https://gopkg.in/vrecan/death.v1)| [souce](https://github.com/vrecan/death/tree/v1.0) | [doc](https://godoc.org/gopkg.in/vrecan/death.v1) | This supports loggers who _do_ return an error from their `Error` and `Warn` functions like [seelog](https://github.com/cihub/seelog)
15-
16-
9+
| Version | Go Get URL | source | doc | Notes |
10+
| ------- | ------------------------------------------------------------ | --------------------------------------------------- | ------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
11+
| 3.x | [gopkg.in/vrecan/death.v3](https://gopkg.in/vrecan/death.v3) | [source](https://github.com/vrecan/death/tree/v3.0) | [doc](https://godoc.org/gopkg.in/vrecan/death.v3) | This removes the need for an independent logger. By default death will not log but will return an error if all the closers do not properly close. If you want to provide a logger just satisfy the deathlog.Logger interface. |
12+
| 2.x | [gopkg.in/vrecan/death.v2](https://gopkg.in/vrecan/death.v2) | [source](https://github.com/vrecan/death/tree/v2.0) | [doc](https://godoc.org/gopkg.in/vrecan/death.v2) | This supports loggers who _do not_ return an error from their `Error` and `Warn` functions like [logrus](https://github.com/sirupsen/logrus) |
13+
| 1.x | [gopkg.in/vrecan/death.v1](https://gopkg.in/vrecan/death.v1) | [souce](https://github.com/vrecan/death/tree/v1.0) | [doc](https://godoc.org/gopkg.in/vrecan/death.v1) | This supports loggers who _do_ return an error from their `Error` and `Warn` functions like [seelog](https://github.com/cihub/seelog) |
1714

1815
Example
16+
1917
```bash
2018
go get gopkg.in/vrecan/death.v3
2119
```
20+
2221
## Use The Library
2322

2423
```go
@@ -37,6 +36,7 @@ func main() {
3736
```
3837

3938
### Close Other Objects On Shutdown
39+
4040
<p>One simple feature of death is that it can also close other objects when shutdown starts</p>
4141

4242
```go
@@ -85,26 +85,28 @@ import (
8585
func main() {
8686
death := DEATH.NewDeath(SYS.SIGINT, SYS.SIGTERM) //pass the signals you want to end your application
8787
//when you want to block for shutdown signals
88-
death.WaitForDeathWithFunc(func(){
88+
death.WaitForDeathWithFunc(func(){
8989
//do whatever you want on death
90-
})
90+
})
9191
}
9292
```
9393

9494
# Release Process
9595

9696
## Rules for release branches:
97+
9798
- If you are releasing a new major version you need to branch off of master into a branch `release-branch.v#` (example `release-branch.v2` for a 2.x release)
9899
- If you are releasing a minor or patch update to an existing major release make sure to merge master into the release branch
99100

100-
101101
## Rules for tagging and publishing the release
102+
102103
When you are ready to publish the release make sure you...
104+
103105
1. Merge your changes into the correct release branch.
104106
2. Check out the release branch locally (example: `git pull origin release-branch.v3`)
105107
3. Create a new tag for the specific release version you will publish (example: `git tag v3.0.1`)
106108
4. Push the tag up to github (example: `git push origin v3.0.1`)
107109
5. Go to the release tab in github
108-
6. Select the target branch as the release branch and type in the tag name (tagname should include `v` so example: `v3.0.1`)
110+
6. Select the target branch as the release branch and type in the tag name (tagname should include `v` so example: `v3.0.1`)
109111
7. Write a title and a well worded description on exactly what is in this change
110112
8. Click publish release

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/vrecan/death
1+
module github.com/vrecan/death/v3
22

33
go 1.14
44

pkgPath_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ func TestGetPkgPath(t *testing.T) {
1212
c := &Closer{}
1313
name, pkgPath := getPkgPath(c)
1414
So(name, ShouldEqual, "Closer")
15-
So(pkgPath, ShouldEqual, "github.com/vrecan/death")
15+
So(pkgPath, ShouldEqual, "github.com/vrecan/death/v3")
1616

1717
})
1818

@@ -21,14 +21,14 @@ func TestGetPkgPath(t *testing.T) {
2121
closable = Closer{}
2222
name, pkgPath := getPkgPath(closable)
2323
So(name, ShouldEqual, "Closer")
24-
So(pkgPath, ShouldEqual, "github.com/vrecan/death")
24+
So(pkgPath, ShouldEqual, "github.com/vrecan/death/v3")
2525
})
2626

2727
Convey("Give pkgPath a copy", t, func() {
2828
c := Closer{}
2929
name, pkgPath := getPkgPath(c)
3030
So(name, ShouldEqual, "Closer")
31-
So(pkgPath, ShouldEqual, "github.com/vrecan/death")
31+
So(pkgPath, ShouldEqual, "github.com/vrecan/death/v3")
3232
})
3333
}
3434

0 commit comments

Comments
 (0)