-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Print config #1969
Print config #1969
Conversation
@@ -312,6 +313,11 @@ func (d *Duration) UnmarshalText(text []byte) error { | |||
return nil | |||
} | |||
|
|||
// WriteConfigFile writes the config to the specified writer | |||
func WriteConfigFile(c *Config, w io.Writer) 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.
I would have expected this to be a method on the Config
type. Am I missing something?
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.
@otoolep yeah, it was almost flip a coin for me which way to go. I do agree I think it's a method, not a function. updated.
Looks like a worthy change, but I do have a question about the method. |
+1 |
This will allow us to print out the config by issuing the command:
You can also
And then this will parse/load the config you specified, and print it back out. This will be valuable to make sure people are running what they think they are running.