-
-
Notifications
You must be signed in to change notification settings - Fork 256
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
Add GetFieldParams and GetFieldParamsWithOptions functions #261
Conversation
@caarlos0 Any problems with this concept? |
Implementation looks OK, but needs merge with main. |
Done |
} | ||
|
||
func parseInternal(v interface{}, opts Options) error { | ||
func GetFieldParams(v interface{}) ([]FieldParams, error) { |
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.
missing godoc
return GetFieldParamsWithOptions(v, defaultOptions()) | ||
} | ||
|
||
func GetFieldParamsWithOptions(v interface{}, opts Options) ([]FieldParams, error) { |
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.
missing godoc
var unset bool | ||
var notEmpty bool | ||
var expand bool | ||
type FieldParams struct { |
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.
missing godoc
hey, just missing the godocs and pass thank you |
@caarlos0 No problem, I've made the corrections you suggested. |
merged, thank you! |
…0#261) * Add GetFieldParams and GetFieldParamsWithOptions functions * Add nested structure to tests * Fixes after merge with origin/main * Added missing godocs and fixed golangci-lint
Here's example implementation for #260, not really sure about names I used :)