Skip to content

Commit

Permalink
Merge pull request #69 from ctrox/unexported-fields
Browse files Browse the repository at this point in the history
  • Loading branch information
kikito committed Jun 16, 2021
2 parents e21992e + de23bc8 commit eee848e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ func getSchemaDict(t reflect.Type) schemaDict {
fieldsArray := []schemaDict{}
for i := 0; i < t.NumField(); i++ {
field := t.Field(i)
// ignore unexported fields
if len(field.PkgPath) != 0 {
continue
}
typeDecl := getSchemaDict(field.Type)
if typeDecl == nil {
// ignore unrepresentable types
Expand Down

0 comments on commit eee848e

Please sign in to comment.