Simple wrapper for handling creation and management of a single background goroutine.
In most of our go programs we had a lot of boilerplate code that if done wrong would generate bugs.
common mistakes this helps us avoid:
- sync.Waitgroup without a pointer
- done channel with a size above 0 //if 0 and close is called but start isn't you block forever
- start is always in a Once.Do so repeated calls to start don't spin up multiple goroutines
- If you are releasing a new major version you need to branch off of master into a branch
release-branch.v#
(examplerelease-branch.v2
for a 2.x release) - If you are releasing a minor or patch update to an existing major release make sure to merge master into the release branch
When you are ready to publish the release make sure you...
- Merge your changes into the correct release branch.
- Check out the release branch locally (example:
git pull origin release-branch.v3
) - Create a new tag for the specific release version you will publish (example:
git tag v3.0.1
) - Push the tag up to github (example:
git push origin v3.0.1
) - Go to the release tab in github
- Select the target branch as the release branch and type in the tag name (tagname should include
v
so example:v3.0.1
) - Write a title and a well worded description on exactly what is in this change
- Click publish release