Documentation
¶
Index ¶
- type Stringer
- func (s *Stringer) SetComma(c byte) *Stringer
- func (s *Stringer) SetEquals(e byte) *Stringer
- func (s *Stringer) SetMapComma(b bool) *Stringer
- func (s *Stringer) SetSliceComma(b bool) *Stringer
- func (s *Stringer) WriteI(v ...interface{}) (int, error)
- func (s *Stringer) WriteStrings(v ...string) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Stringer ¶
Stringer extends strings.Builder with varargs-based write methods.
func NewStringer ¶
func NewStringer() *Stringer
NewStringer returns a new Stringer with the default settings. - Comma separator ) "," - Equals symbol "="
func (*Stringer) SetMapComma ¶
SetMapComma enables adding a comma between elements in supplied maps.
func (*Stringer) SetSliceComma ¶
SetSliceComma enables adding a comma between elements in supplied slices.
func (*Stringer) WriteI ¶
WriteI writes any number of different types at once. Special notes: Integers - int and int64 are the only approved types, and untyped whole numbers will be parsed as int Floating point numbers - all numbers with a decimal point are interpreted as float64, with the fewest necessary decimal places Maps & slices - commas are not on by default, and maps will have "=" between each key-value pair