Documentation ¶
Overview ¶
Package fmtutil provides utilities for implementing the interfaces consumed by the "fmt" package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BitfieldString ¶
func FmtStateString ¶
FmtStateString returns the fmt.Printf string that produced a given fmt.State and verb.
func FormatByteArrayStringer ¶
func FormatByteArrayStringer( obj interface { fmt.Stringer fmt.Formatter }, objBytes []byte, f fmt.State, verb rune, )
FormatByteArrayStringer is function for helping to implement fmt.Formatter for []byte or [n]byte types that have a custom string representation. Use it like:
type MyType [16]byte func (val MyType) String() string { … } func (val MyType) Format(f fmt.State, verb rune) { util.FormatByteArrayStringer(val, val[:], f, verb) }
Types ¶
type BitfieldFormat ¶
type BitfieldFormat uint8
const ( HexNone BitfieldFormat = iota HexLower HexUpper )
Click to show internal directories.
Click to hide internal directories.