Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 908eaed

Browse files
authored
Merge pull request #408 from onelrdm/master
skip - tag before spliting parts
2 parents 819acad + 1ba732a commit 908eaed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎reflect_extension.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,10 +341,10 @@ func describeStruct(ctx *ctx, typ reflect2.Type) *StructDescriptor {
341341
if ctx.onlyTaggedField && !hastag && !field.Anonymous() {
342342
continue
343343
}
344-
tagParts := strings.Split(tag, ",")
345344
if tag == "-" {
346345
continue
347346
}
347+
tagParts := strings.Split(tag, ",")
348348
if field.Anonymous() && (tag == "" || tagParts[0] == "") {
349349
if field.Type().Kind() == reflect.Struct {
350350
structDescriptor := describeStruct(ctx, field.Type())

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /