Hobocode is a pty-aware colorized printing library intended for use in CLI applications for human consumption and UX rather than structured outputs.
Uses go-pretty v6 for colors and Sprinting.
hobocode.Header("Hobocode Example")
hobocode.Success("Welcome to hobocode")
The underlying functions can be used if you are working with custom *os.File's or you can use the lazy opinionated helpers like
hobocode.Warn("Something might be going wrong")
hobocode.Debugf("Output: %v", ret.Body())
hobocode.Ierror(2, "Something went terribly wrong")
hobocode.Iinfof(1, "Date: %s", time.Now().Format("2006/01/02"))
See examples
import (
"github.com/asciifaceman/hobocode"
)
func main() {
userinput := hobocode.Input("nvim", "What is your preferred editor?")
hobocode.Notef("You chose: %s", userinput)
}