Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Converter ¶
type Converter struct {
// contains filtered or unexported fields
}
func NewConverter ¶
func NewConverterOption ¶
func NewConverterOption(src, dst interface{}, option *StructOption) (*Converter, error)
type StructOption ¶
StructOption describe options in converting struct. BannedFields lists fields that are not allowed to be converted in dst struct. AliasFields lists fields that are supposed to use alias field-name in dst struct when converting. Both BannedFields and AliasFields support nested fields. For example, `A.B` in BannedFields or key of AliasFields means `A` field in dst struct is a struct, and the option is applied to `B` field in `A`.
Click to show internal directories.
Click to hide internal directories.