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 Options to EZ package #29

Merged
merged 6 commits into from
Jul 29, 2020
Merged

Add Options to EZ package #29

merged 6 commits into from
Jul 29, 2020

Conversation

sachinagada
Copy link
Contributor

No description provided.

@sachinagada sachinagada requested a review from a team July 29, 2020 15:45
@sachinagada sachinagada changed the title Add ConfigFileEnvFlagWithFlagCfg func Add Options to EZ package Jul 29, 2020
func getDefaultOption() *dialsOptions {
return &dialsOptions{
flagConfig: flag.DefaultFlagNameConfig(),
}
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Let's initialize watch to false explicitly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

ez/ez.go Outdated
return func(d *dialsOptions) { d.watch = true }
}

type decoderFactory func(string) dials.Decoder
Copy link
Contributor

Choose a reason for hiding this comment

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

This type should be exported with a docstring, since it's part of the public interface.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Exported DecoderFactory and added a doc string

ez/ez.go Outdated
@@ -41,7 +42,8 @@ func WithWatchingConfigFile() Option {
return func(d *dialsOptions) { d.watch = true }
}

type decoderFactory func(string) dials.Decoder
// DecoderFactory should return the appropriate decoder based on the config file name
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Let's extend his docstring slightly to say that the file path is passed as the string argument.

@sachinagada sachinagada merged commit b597199 into master Jul 29, 2020
@sachinagada sachinagada deleted the expand-ez branch July 29, 2020 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants