Skip to content

sitnikovik/paints

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Paints 🎨

Go Reference Go Report Card License: MIT GitHub go.mod Go version Release

Toolkit to prettify the output of your golang apps

Features

  • 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

Installation

go get github.com/sitnikovik/paints

Getting started

package 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)
}

Documentation

Full API reference is available on pkg.go.dev

Requirements

  • Go 1.23.4 (as declared in go.mod) — newer Go versions should work
  • No external runtime dependencies

Contributing

Contributions are welcome. Suggested workflow:

  1. Pick an open issue and work on it. Open a Pull Request that references the issue when you're ready
  2. 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.
  3. Fork the repository and create a feature branch: git checkout -b feature/name
  4. Run and add tests for new behavior: go test ./...
  5. Commit changes with a descriptive message and open a Pull Request
  6. Follow the repository's code style and linters (we use golangci-lint)
  7. 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.

License

This project is licensed under the MIT License — see the LICENSE file for details.

Author / Contact

Maintained by Ilya Sitnikov

About

Toolkit to prettify the output of your golang apps

Topics

Resources

License

Stars

Watchers

Forks

Contributors