Skip to content

Commit 3919bbb

Browse files
committed
Add info about returned types to MapAny
1 parent 5b1e667 commit 3919bbb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mapify.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ func (e Element) StructField() (_ reflect.StructField, ok bool) {
5151
}
5252

5353
// MapAny maps any object (struct, map, slice etc.) by converting each struct found to a map.
54+
//
55+
// * for struct the returned type will be map[string]interface{}
56+
// * for slice of structs the returned type will be []map[string]interface{}
5457
func (i Mapper) MapAny(v interface{}) (interface{}, error) {
5558
return i.newInstance().mapAny("", v)
5659
}

0 commit comments

Comments
 (0)