Hope it works
This commit is contained in:
parent
e9e7b5058f
commit
55fcca661e
@ -25,3 +25,11 @@ func AssociateColumns(typ reflect.Type, tag string, cols []string) map[int]int {
|
|||||||
}
|
}
|
||||||
return colFields
|
return colFields
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Dereference keeps dereferencing pointers until a value is found.
|
||||||
|
func Dereference(val reflect.Value) reflect.Value {
|
||||||
|
for val.Kind() == reflect.Ptr && val.CanAddr() {
|
||||||
|
val = val.Elem()
|
||||||
|
}
|
||||||
|
return val
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user