First off, thank you for considering contributing to Gotalk. It's people like you that make the Internet such a great place.
Following these guidelines helps to communicate that you respect the time of the people managing and developing this open source project. In return, they should reciprocate that respect in addressing your issue or suggestion.
By contributing work to the Gotalk project you agree to have all work contributed becoming the intellectual property of the Gotalk project as described by The MIT License.
Requirements:
- Go version
grep '^go' go.mod
or later (Gotalk uses go modules) - Make version 3 or later (only required to use the Makefile setup)
- Bash version 3 or later (only required to use the Makefile setup)
Overview of make
targets:
make
-- builds gotalk and runs go tests & tests in the examples dir.make dev
-- start iterative development mode. See below for details.make fmt
-- rungofmt
on all source codemake doc
-- generate & serve documentation athttp://localhost:6060/pkg/github.com/rsms/gotalk/
make dev
starts an iterative development mode which watches source files
for changes and performs the following tasks when started and whenever source
files change:
gofmt
to format source code if neededgo test
to run all go tests (but not tests inexamples/
)go tool cover
to generate code coverage report
When make dev
is running, live code coverage report can be viewed at
http://localhost:8148/
go test
Contributions this project is looking for:
- Implementations of Gotalk in languages other than Go and JavaScript
- Bug fixes (please first file an issue)
- Security vulnerabilities
- Performance improvements (with some reservations for complexity)
For small things like spelling mistakes, readme changes or code comments, please open an issue instead of submitting a pull request.
-
Check issues for an existing change. If there is one, chime in the conversation. If not, please file a new issue.
-
If this is a bug or security vulnerability, make sure to have a clear and minimmal reproduction. Ideally something that is as focused, small and specific as possible that proves the bug or vulnerability. Include this in the issue (or add it to an existing issue.)
-
Optional but very much appreciated: Add a test (e.g.
bugname_test.go
) which triggers the bug before your fix and passes with your fix. This can be the same thing as checklist-item 2. -
Make sure that the test suite passes by running
make test
. It is also a good idea to run one of the complex example programs in theexamples/
directory and verify that it works. E.g.cd examples/websocket-chat && go build && ./websocket-chat
-
Submit a PR referencing the issue
Thank you!