Documentation
¶
Index ¶
- func LoadQuick[K comparable, V any](data interface{}, sourceField string, targetField string, getter Getter[K, V]) error
- func LoadQuickMulti[K comparable, V any](data interface{}, fields []FieldPair, getter Getter[K, V]) error
- func LoadQuickMultiWithType[K comparable, V any](data interface{}, fields []FieldPair, sourceType reflect.Kind, ...) error
- func LoadQuickWithType[K comparable, V any](data interface{}, sourceField string, targetField string, ...) error
- type FieldPair
- type Getter
- type Loader
- type Pair
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadQuick ¶
func LoadQuick[K comparable, V any]( data interface{}, sourceField string, targetField string, getter Getter[K, V], ) error
LoadQuick 快速加载单一分组的值映射
func LoadQuickMulti ¶
func LoadQuickMulti[K comparable, V any]( data interface{}, fields []FieldPair, getter Getter[K, V], ) error
LoadQuickMulti 快速加载多个字段的值映射
Types ¶
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
Loader 值加载器
func (*Loader) AddMapping ¶
AddMapping 添加字段映射和对应的值获取器
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
1_user_info
command
|
|
|
2_basic_types
command
|
|
|
3_multi_mapping
command
|
|
|
4_strict_mapping
command
|
Click to show internal directories.
Click to hide internal directories.