Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteAllTo ¶
WriteAllTo calls WriteTo on all elements of the WriterTo slice and returns the total number of bytes written.
Types ¶
type KeyValueFormatter ¶ added in v2.9.3
type KeyValueFormatter struct { Prefix string Indent string Separator string // contains filtered or unexported fields }
KeyValueFormatter will format each key/value pair added by Add so that they are prefixed with Prefix and have a vertically aligned ':' between the key and the value. Each pair is separated by a newline, and if a value contains newlines, then each line in that value, except the first one will be prefixed with `Prefix`, and Indent.
func DefaultKeyValueFormatter ¶ added in v2.9.3
func DefaultKeyValueFormatter() *KeyValueFormatter
func (*KeyValueFormatter) Add ¶ added in v2.9.3
func (f *KeyValueFormatter) Add(k, v string)
Add adds a key value pair that will be included in the formatted output.
func (*KeyValueFormatter) String ¶ added in v2.9.3
func (f *KeyValueFormatter) String() string
String returns the formatted output string.
Click to show internal directories.
Click to hide internal directories.