Skip to content

Commit 20e19b9

Browse files
committed
remove a call to StructField.IsExported as it is not in go1.13
1 parent 3cc1671 commit 20e19b9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

struct.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ func (s *Struct) Values(st interface{}) []interface{} {
437437
return s.ValuesForTag("", st)
438438
}
439439

440-
// Values returns a shadow copy of all fields tagged with tag in st.
440+
// ValuesForTag returns a shadow copy of all fields tagged with tag in st.
441441
func (s *Struct) ValuesForTag(tag string, value interface{}) (values []interface{}) {
442442
sf := s.structFieldsParser()
443443
v := reflect.ValueOf(value)

structfields.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func (sf *structFields) parse(t reflect.Type, mapper FieldMapperFunc, prefix str
5252
field := t.Field(i)
5353

5454
// Skip unexported fields that are not embedded structs.
55-
if !field.IsExported() && !field.Anonymous {
55+
if field.PkgPath != "" && !field.Anonymous {
5656
continue
5757
}
5858

0 commit comments

Comments
 (0)