Documentation ¶
Index ¶
- func P(name string, opts ...Option) string
- type Option
- func Bool(b bool, label ...string) Option
- func BoolSilentFalse(b bool, label ...string) Option
- func BoolSilentTrue(b bool, label ...string) Option
- func Bytes(b []byte, label ...string) Option
- func Error(e error, label ...string) Option
- func Func(f any, label ...string) Option
- func FuncAltNil(f any, alt string, label ...string) Option
- func FuncAltNotNil(f any, alt string, label ...string) Option
- func Int(i int, label ...string) Option
- func Literal(txt string, label ...string) Option
- func LiteralStringers[T fmt.Stringer](list []T, label ...string) Option
- func LiteralStrings(s []string, label ...string) Option
- func Obj(o any, label ...string) Option
- func String(txt string, label ...string) Option
- func StringMap(m map[string]string, label ...string) Option
- func Stringers[T fmt.Stringer](list []T, label ...string) Option
- func Strings(s []string, label ...string) Option
- func SubOpt() Option
- func Yields(opts ...Option) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
Option is the command interface for the print package.
func BoolSilentFalse ¶
BoolSilentFalse takes a bool with optional label and renders them consistently. If the value of the bool is false, no output is added.
func BoolSilentTrue ¶
BoolSilentTrue takes a bool with optional label and renders them consistently. If the value of the bool is true, no output is added.
func FuncAltNil ¶ added in v0.13.0
FuncAltNil renders the function like Func() except the alt string is used for when the function is nil.
func FuncAltNotNil ¶ added in v0.13.0
FuncAltNotNil renders the function like Func() except the alt string is used for when the function is not nil.
func LiteralStringers ¶
LiteralStringerss takes an array of fmt.Stringers literals with optional label and renders them consistently.
func LiteralStrings ¶
LiteralStrings takes an array of string literals with optional label and renders them consistently.
func StringMap ¶ added in v0.9.0
StringMap takes a map of strings to strings parameter with optional label and renders them consistently.
func Stringers ¶
Stringers takes an array of fmt.Stringers parameters with optional label and renders them consistently.
func Strings ¶
Strings takes an array of strings parameter with optional label and renders them consistently.