Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fprint ¶
Fprint formats using the default formats for its operands and writes to w. Spaces are added between operands when neither is a string. It returns the number of bytes written and any write error encountered.
Types ¶
type IColorFlow ¶
type IColorFlow interface { String() string Print(str interface{}, colors ...Color) IColorFlow PrintLn(str interface{}, colors ...Color) IColorFlow Printf(format string, args Args, colors ...Color) IColorFlow }
func New ¶
func New(writer ...io.Writer) IColorFlow
New creates a new IColorFlow
- writer: (Optional) An io.Writer where the messages will be written. If using a writer, `String()` is not supported.
type IFmt ¶
type IFmt interface { Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) Printf(format string, a ...interface{}) (n int, err error) Sprintf(format string, a ...interface{}) string Errorf(format string, a ...interface{}) error Fprint(w io.Writer, a ...interface{}) (n int, err error) Print(a ...interface{}) (n int, err error) Sprint(a ...interface{}) string Fprintln(w io.Writer, a ...interface{}) (n int, err error) Println(a ...interface{}) (n int, err error) Sprintln(a ...interface{}) string }
func WithColors ¶
WithColors is an easy way to use the same function signature presented in the 'fmt' to print color messages.
Eg: fmtc.WithColors(fmtc.White, fmtc.BgRed).Println(" danger! ")
Click to show internal directories.
Click to hide internal directories.