Skip to content

Commit

Permalink
[typeinfo] Skip private and --tagged fields.
Browse files Browse the repository at this point in the history
  • Loading branch information
DHowett committed Nov 28, 2013
1 parent 8fa0d1e commit 0e93e07
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions typeinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ func getTypeInfo(typ reflect.Type) (*typeInfo, error) {
n := typ.NumField()
for i := 0; i < n; i++ {
f := typ.Field(i)
if f.PkgPath != "" || f.Tag.Get("plist") == "-" {
continue // Private field
}

// For embedded structs, embed its fields.
if f.Anonymous {
Expand Down

0 comments on commit 0e93e07

Please sign in to comment.