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
Fix static config inspection #496
Conversation
hmm, travis is having issues atm https://www.traviscistatus.com/ |
err := yaml.Unmarshal(bytes, &object) | ||
if err != nil { | ||
panic(err) | ||
} | ||
return object | ||
return stringizeMapKey(object).(map[string]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.
Won't this type assertion fail if you take the []interface{}
case in stringizeMapKey
? Since it passes tests, does that make the []interface{}
case dead code if doesn't occur?
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.
object
is declared of type map[interface{}]interface{}
, so the conversion should not fail. The []interface{}
case is for when the value is a slice of maps where the keys are also interface{} and need to be stringized.
err := yaml.Unmarshal(bytes, &object) | ||
if err != nil { | ||
panic(err) | ||
} | ||
return object | ||
return stringizeMapKey(object).(map[string]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.
nit: stringizeMapKey
---> stringifyMapKey
This PR fixes the config inspection logging field.
Previously upon starting the server, the logging field errors:
Now: