-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Exit when invalid engine is selected #4586
Conversation
5b394a7
to
597c4bb
Compare
It is not possible to exit short of a panic, but this change makes it very clear in the logs.
|
works for me |
Could we validate this in the config? i.e.: https://github.com/influxdb/influxdb/blob/master/cmd/influxd/run/command.go#L104 |
Yeah, that might be better. Let me try that. On Tue, Oct 27, 2015 at 12:19 PM, Jason Wilder notifications@github.com
|
597c4bb
to
a1f2e60
Compare
OK, updated as per @jwilder . Program now exits, which is better.
|
@@ -128,3 +130,24 @@ func NewConfig() Config { | |||
QueryLogEnabled: true, | |||
} | |||
} | |||
|
|||
func (c *Config) Validate() 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.
This pattern, of adding Validate
to individual config types, exists elsewhere in the code.
a1f2e60
to
dd5b324
Compare
dd5b324
to
00b2454
Compare
👍 |
Exit when invalid engine is selected
Fix #4585, related to #4583