Documentation ¶
Index ¶
- Variables
- type Bool
- func (b Bool) Errorf(format string, a ...interface{}) error
- func (b Bool) Fprint(w io.Writer, a ...interface{}) (n int, err error)
- func (b Bool) Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error)
- func (b Bool) Fprintln(w io.Writer, a ...interface{}) (n int, err error)
- func (b *Bool) Get() interface{}
- func (b *Bool) IsBoolFlag() bool
- func (b Bool) Print(a ...interface{}) (n int, err error)
- func (b Bool) Printf(format string, a ...interface{})
- func (b Bool) Println(a ...interface{}) (n int, err error)
- func (b *Bool) Set(s string) error
- func (b Bool) Sprint(a ...interface{}) string
- func (b Bool) Sprintf(format string, a ...interface{}) string
- func (b Bool) Sprintln(a ...interface{}) string
- func (b *Bool) String() string
Constants ¶
This section is empty.
Variables ¶
var BoolWriter io.Writer = os.Stdout
BoolWriter is the default io.Writes interface used by bfmt.Bool to output things
Functions ¶
This section is empty.
Types ¶
type Bool ¶
type Bool bool
Bool is just a bool type, that conditionally mimics the fmt package. If its value is `true` Bool methods do what they are meant to be done, otherwise, they do nothing.
func (Bool) Errorf ¶
Errorf conditionally and formatted output to a error. See fmt.Errorf. Return nil if false.
func (Bool) Fprint ¶
Fprint conditionally print output to an io.Writer. See fmt.Fprint. Return (0, nil) if false.
func (Bool) Fprintf ¶
Fprintf conditionally and formatted output to a io.Writer. See fmt.Fprintf. Return (0, nil) if false.
func (Bool) Fprintln ¶
Fprintln conditionally print output with carriage return to an io.Writer. See fmt.Fprintln. Return (0, nil) if false.
func (*Bool) Get ¶
func (b *Bool) Get() interface{}
Get returns a bool that have the same value as the method receiver
func (Bool) Println ¶
Println conditionally print output with carriage return. See fmt.Println. Return (0, nil) if false.
func (Bool) Sprint ¶
Sprint conditionally print output to a string. See fmt.Sprint. Return "" if false.
func (Bool) Sprintf ¶
Sprintf conditionally and formatted output to a string. See fmt.Sprintf. Return "" if false.