Documentation ¶
Index ¶
- Constants
- func Bool(value bool) string
- func Float32(f float32) string
- func Float64(f float64) string
- func Int(value int64) string
- func Interface(value interface{}) string
- func IsInterfaceNil(param interface{}) bool
- func Map(value interface{}) string
- func Slice(value []interface{}) string
- func SliceOfBytes(value []byte) string
- func String(value string) string
- func Struct(name string, fields ...*StructField) string
- func UInt(value uint64) string
- type StructBuilder
- type StructField
Constants ¶
View Source
const (
IndentationSize = 4
)
Variables ¶
This section is empty.
Functions ¶
func IsInterfaceNil ¶
func IsInterfaceNil(param interface{}) bool
func SliceOfBytes ¶
func Struct ¶
func Struct(name string, fields ...*StructField) string
Struct creates a string representation of the given struct details.
Types ¶
type StructBuilder ¶
type StructBuilder struct {
// contains filtered or unexported fields
}
func NewStructBuilder ¶
func NewStructBuilder(name string, fields ...*StructField) *StructBuilder
NewStructBuilder returns a builder for the struct that can dynamically be modified.
func (*StructBuilder) AddField ¶
func (stringifyStruct *StructBuilder) AddField(field *StructField)
AddField dynamically adds a new field to the struct.
func (*StructBuilder) String ¶
func (stringifyStruct *StructBuilder) String() (result string)
type StructField ¶
type StructField struct {
// contains filtered or unexported fields
}
func NewStructField ¶
func NewStructField(name string, value interface{}) *StructField
func (*StructField) String ¶
func (structField *StructField) String() (result string)
Click to show internal directories.
Click to hide internal directories.