From dc3312cb1a4513a366c4c9e622ad55c32df12ed3 Mon Sep 17 00:00:00 2001 From: Fatih Arslan Date: Sun, 7 Aug 2016 19:55:29 -0400 Subject: [PATCH] struct: add comment about the if clause --- structs.go | 1 + 1 file changed, 1 insertion(+) diff --git a/structs.go b/structs.go index 9739f38..06da620 100644 --- a/structs.go +++ b/structs.go @@ -558,6 +558,7 @@ func (s *Struct) nested(val reflect.Value) interface{} { // TODO(arslan): should this be optional? // do not iterate of non struct types, just pass the value. Ie: []int, // []string, co... We only iterate further if it's a struct. + // i.e []foo or []*foo if val.Type().Elem().Kind() != reflect.Struct && !(val.Type().Elem().Kind() == reflect.Ptr && val.Type().Elem().Elem().Kind() == reflect.Struct) {