Documentation
¶
Index ¶
- func DisableColors()
- func EnableColors()
- func Errorf(format string, a ...interface{}) error
- func Fprint(w io.Writer, a ...interface{}) (n int, err error)
- func Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error)
- func Fprintln(w io.Writer, a ...interface{}) (n int, err error)
- func Print(a ...interface{}) (n int, err error)
- func Printf(format string, a ...interface{}) (n int, err error)
- func Println(a ...interface{}) (n int, err error)
- func RegisterStyle(name string, fn func(string) string)
- func Sprint(a ...interface{}) string
- func Sprintf(format string, a ...interface{}) string
- func Sprintln(a ...interface{}) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisableColors ¶ added in v1.3.0
func DisableColors()
DisableColors globally disables colors. After parsing, no styles will be applied and the output will be clean text.
func RegisterStyle ¶
RegisterStyle registers a new custom style.
It will look like this:
cfmt.RegisterStyle("code", func(s string) string {
return cfmt.Sprintf("{{%s}}::red|underline", s)
})
The first argument is the name by which this style will be used, and the second is the styling function itself.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.