fatih / color

Color package for Go (golang)
https://pkg.go.dev/github.com/fatih/color
MIT License
7.26k stars 615 forks source link

Properly handle single arg calls to helper funcs #39

Closed moorereason closed 7 years ago

moorereason commented 7 years ago

When calling Red("cat%dog") or RedString("cat%dog") without additional args, the string is interpreted as a format. The result is cat%!d(MISSING)dog. This is unexpected behavior. Or as @davecheney said, "Wow, what an API footgun."

See davecheney/httpstat/pull/70