Thanks for your interest in improving jsoncolor! This document covers how to
get set up, what's expected of a change, and how releases work.
jsoncolor is a drop-in replacement for the standard library's encoding/json
that emits colorized JSON. It is layered onto a fork of
segmentio/encoding; much of the code
(and many of the tests) is inherited from that project. See
SEGMENTIO_README.md for the upstream documentation.
- Go 1.25 or newer (see the
godirective ingo.mod). golangci-lintv2 (CI runs v2.12.2).
go build ./...
go test ./...
golangci-lint run ./...Run the encoding benchmarks with:
go test -bench=BenchmarkEncode -benchtime=5s- Fork the repository and create a topic branch.
- Make your change with accompanying tests. New behavior should be covered; bug fixes should include a regression test.
- Ensure
go build ./...,go test ./..., andgolangci-lint run ./...all pass locally. - Add a bullet to the
## CHANGELOGsection ofREADME.mdunder the current (unreleased) version heading, referencing the issue or PR number. - Open a pull request against
master. CI must pass, and the branch requires one approving review before it can be merged.
Please keep pull requests focused; unrelated refactors are much easier to review as separate PRs.
Use the GitHub issue tracker.
For security vulnerabilities, follow SECURITY.md instead of
opening a public issue.
Maintainers cut a release by pushing an annotated vX.Y.Z tag to origin. The
## CHANGELOG section in README.md is the human-readable
changelog. This project uses tags as the release mechanism and does not publish
GitHub Releases.