-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support replace FieldParser #1043
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1043 +/- ##
==========================================
+ Coverage 92.96% 93.05% +0.09%
==========================================
Files 7 8 +1
Lines 2018 2046 +28
==========================================
+ Hits 1876 1904 +28
Misses 79 79
Partials 63 63
Continue to review full report at Codecov.
|
@forsaken628 Looks good until now, congrats. We will need to have positive coverage on parser.go so we can merge it. |
I move a lot code to new file. So it's seem no possible have positive coverage on parser.go. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@forsaken628 The code in parser.go conflicts with my modifications, #1045 😄 |
@@ -1053,13 +1057,25 @@ func (parser *Parser) parseStructField(file *ast.File, field *ast.Field) (map[st | |||
return map[string]spec.Schema{typeName: *schema}, nil, nil | |||
} | |||
|
|||
fieldName, schema, err := parser.getFieldName(field) | |||
ps := newTagBaseFieldParser(parser, field) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@forsaken628 It should be:
ps := parser.fieldParserFactory(parser, field)
Describe the PR
Support replace FieldParser. Then we can use this as a libary and write custom feature.
Relation issue
no
Additional context
no