Skip to content

Commit

Permalink
Merge pull request #408 from onelrdm/master
Browse files Browse the repository at this point in the history
skip - tag before spliting parts
  • Loading branch information
taowen authored Oct 12, 2019
2 parents 819acad + 1ba732a commit 908eaed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion reflect_extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,10 +341,10 @@ func describeStruct(ctx *ctx, typ reflect2.Type) *StructDescriptor {
if ctx.onlyTaggedField && !hastag && !field.Anonymous() {
continue
}
tagParts := strings.Split(tag, ",")
if tag == "-" {
continue
}
tagParts := strings.Split(tag, ",")
if field.Anonymous() && (tag == "" || tagParts[0] == "") {
if field.Type().Kind() == reflect.Struct {
structDescriptor := describeStruct(ctx, field.Type())
Expand Down

0 comments on commit 908eaed

Please sign in to comment.