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

Print config #1969

Merged
merged 3 commits into from
Mar 16, 2015
Merged

Print config #1969

merged 3 commits into from
Mar 16, 2015

Conversation

corylanou
Copy link
Contributor

This will allow us to print out the config by issuing the command:

influxd config

You can also

influxd config -config=conf.toml -host=foo.bar

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.

@@ -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 {
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@otoolep
Copy link
Contributor

otoolep commented Mar 16, 2015

Looks like a worthy change, but I do have a question about the method.

@otoolep
Copy link
Contributor

otoolep commented Mar 16, 2015

+1

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