MCPcopy Create free account
hub / github.com/devfeel/mapper / MapperSlice

Function MapperSlice

mapper.go:185–187  ·  view source on GitHub ↗

MapperSlice mapper from slice of struct to a slice of any type fromSlice and toSlice must be a slice of any type.

(fromSlice, toSlice interface{})

Source from the content-addressed store, hash-verified

183// MapperSlice mapper from slice of struct to a slice of any type
184// fromSlice and toSlice must be a slice of any type.
185func MapperSlice(fromSlice, toSlice interface{}) error {
186 return standardMapper.MapperSlice(fromSlice, toSlice)
187}
188
189// MapToJson mapper from map[string]interface{} to json []byte
190func MapToJson(fromMap map[string]interface{}) ([]byte, error) {

Callers 7

mainFunction · 0.92
Benchmark_MapSlice_OldFunction · 0.85
Test_MapperSliceFunction · 0.85
Test_MapperSlice2Function · 0.85
Test_MapperStructSliceFunction · 0.85
Test_MapperStructSlice2Function · 0.85
BenchmarkMapperSliceFunction · 0.85

Calls 1

MapperSliceMethod · 0.65

Tested by 6

Benchmark_MapSlice_OldFunction · 0.68
Test_MapperSliceFunction · 0.68
Test_MapperSlice2Function · 0.68
Test_MapperStructSliceFunction · 0.68
Test_MapperStructSlice2Function · 0.68
BenchmarkMapperSliceFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…