Documentation ¶
Index ¶
Constants ¶
View Source
const ( SrcKeyIndex = iota DestKeyIndex )
Variables ¶
View Source
var ( // ErrNilFunction is the error returned by CreateCustomMap or CreateMapWith // if a nil function is passed to the method. ErrNilFunction = errors.New("mapper: nil function") // ErrMapNotExist is the error returned by the Map method // if a map for given types does not exist. ErrMapNotExist = errors.New("mapper: map does not exist") // ErrMapAlreadyExists is the error returned by one of the CreateMap method // if a given map already exists. Mapper does not allow to override MapFunc. ErrMapAlreadyExists = errors.New("mapper: map already exists") // ErrUnsupportedMap is the error returned by CreateMap or CreateMapWith // if a source - destination mapping is not supported. The mapping is supported only for // structs to structs with at least one exported field by a src side which corresponds to a dst field. ErrUnsupportedMap = errors.New("mapper: unsupported map") )
Functions ¶
func Configure ¶
func Configure(config *MapperConfig)
Types ¶
type MapperConfig ¶
type MapperConfig struct {
MapUnexportedFields bool
}
Click to show internal directories.
Click to hide internal directories.