Toolkit to prettify the output of your golang apps
- Simple functions to colorize text and backgrounds
- Text styles: bold, dim, italic, underline
- Zero runtime dependencies — pure Go implementation
- Small, well-tested functions suitable for CLI output
go get github.com/sitnikovik/paintspackage main
import (
"fmt"
bg "github.com/sitnikovik/paints/color/background"
color "github.com/sitnikovik/paints/color/text"
style "github.com/sitnikovik/paints/style/text"
)
func main() {
// Print text with red background
s := bg.Red("Lorem ipsum")
fmt.Println(s)
// Print green bold text
s = color.Green(style.Bold("Lorem ipsum"))
fmt.Println(s)
}Full API reference is available on pkg.go.dev
- Go 1.23.4 (as declared in
go.mod) — newer Go versions should work - No external runtime dependencies
Contributions are welcome. Suggested workflow:
- Pick an open issue and work on it. Open a Pull Request that references the issue when you're ready
- If there is no suitable issue for your idea, either open a short issue describing the proposal or contact me (watch my bio) and we will create an issue for you.
- Fork the repository and create a feature branch:
git checkout -b feature/name - Run and add tests for new behavior:
go test ./... - Commit changes with a descriptive message and open a Pull Request
- Follow the repository's code style and linters (we use
golangci-lint) - If the PR passes, we merge it and create version via GitHub releases
Please open an issue to discuss large or breaking changes before implementing.
This project is licensed under the MIT License — see the LICENSE file for details.
Maintained by Ilya Sitnikov