Skip to content
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

Merged
merged 5 commits into from
Jul 25, 2023

Conversation

saturn4er
Copy link
Contributor

Here's example implementation for #260, not really sure about names I used :)

@saturn4er
Copy link
Contributor Author

@caarlos0 Any problems with this concept?

@caarlos0
Copy link
Owner

Implementation looks OK, but needs merge with main.

@saturn4er
Copy link
Contributor Author

Done

}

func parseInternal(v interface{}, opts Options) error {
func GetFieldParams(v interface{}) ([]FieldParams, error) {
Copy link
Owner

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) {
Copy link
Owner

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 {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing godoc

@caarlos0
Copy link
Owner

hey, just missing the godocs and pass golangci-lint :P
sorry I missed it earlier

thank you

@saturn4er
Copy link
Contributor Author

@caarlos0 No problem, I've made the corrections you suggested.

@caarlos0 caarlos0 merged commit e7e49c4 into caarlos0:main Jul 25, 2023
@caarlos0
Copy link
Owner

merged, thank you!

BorzdeG pushed a commit to BorzdeG/env that referenced this pull request Aug 24, 2024
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants