Skip to content

Commit dc3312c

Browse files
committed
struct: add comment about the if clause
1 parent bf7dff7 commit dc3312c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

structs.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,7 @@ func (s *Struct) nested(val reflect.Value) interface{} {
558558
// TODO(arslan): should this be optional?
559559
// do not iterate of non struct types, just pass the value. Ie: []int,
560560
// []string, co... We only iterate further if it's a struct.
561+
// i.e []foo or []*foo
561562
if val.Type().Elem().Kind() != reflect.Struct &&
562563
!(val.Type().Elem().Kind() == reflect.Ptr &&
563564
val.Type().Elem().Elem().Kind() == reflect.Struct) {

0 commit comments

Comments
 (0)