Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix the bug :reflect: call of reflect.Value.Type on zero Value if the slice is nil, or len==0, will be panic. the case: type Foo struct{ Bar[]int } func TestGoFunk(t *testing.T) { Log.InitLog() foo := []Foo{} bars := funk.Get(foo, "Bar") //panic !! fmt.Print(bars) }
- Loading branch information