-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
func getDefaultOption() *dialsOptions { | ||
return &dialsOptions{ | ||
flagConfig: flag.DefaultFlagNameConfig(), | ||
} |
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.
nit: Let's initialize watch
to false
explicitly.
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.
Done
ez/ez.go
Outdated
return func(d *dialsOptions) { d.watch = true } | ||
} | ||
|
||
type decoderFactory func(string) dials.Decoder |
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.
This type should be exported with a docstring, since it's part of the public interface.
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.
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 |
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.
nit: Let's extend his docstring slightly to say that the file path is passed as the string argument.
No description provided.