INNER CODE UNIT · Go

func

jinzhu/copier · copier.go:76

	Fn      func(src interface{}) (dst interface{}, err error)
}

type converterPair struct {
	SrcType reflect.Type
	DstType reflect.Type
}

func (opt Option) fieldNameMapping() map[converterPair]FieldNameMapping {
	var mapping = map[converterPair]FieldNameMapping{}

	for i := range opt.FieldNameMapping {
		pair := converterPair{
			SrcType: reflect.TypeOf(opt.FieldNameMapping[i].SrcType),
			DstType: reflect.TypeOf(opt.FieldNameMapping[i].DstType),
		}

		mapping[pair] = opt.FieldNameMapping[i]

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…