Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type OptionFunc ¶
type OptionFunc func(*options)
OptionFunc is a function for making options.
func WithDumpFunc ¶
func WithDumpFunc[T any](f DumpFunc[T]) OptionFunc
WithDumpFunc is an option to add function for customize specified type dump string.
func WithExportedOnly ¶
func WithExportedOnly() OptionFunc
WithExportedOnly enables to display only exported struct field. ignores unexported field.
func WithIndent ¶
func WithIndent(indent int) OptionFunc
WithIndent adjust indent nested in any blocks. default is 2 spaces.
func WithListBreakLineSize ¶
func WithListBreakLineSize(typ interface{}, size int) OptionFunc
WithListBreakLineSize is an option to specify the number of elements to break lines when dumped a listing (slice, array) of a given type. The number must be more than 1 otherwise treats as 1.
func WithUintFormat ¶
func WithUintFormat(mode UintFormat) OptionFunc
WithUintFormat specify mode to display uint format. default is DecimalUint.
type UintFormat ¶
type UintFormat int
const ( // DecimalUint is mode to display uint as decimal format DecimalUint UintFormat = iota // BinaryUint is mode to display uint as binary format // The format be like 0b00000000 BinaryUint // HexUint is mode to display uint as hex format // The format be like 0x00 HexUint )
Click to show internal directories.
Click to hide internal directories.