You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
is there any support for panic on missing config keys and values?
Right now I have a wrapper code that calls the config tool with direct reads to accomplish that:
// Code snippet for panic on missing key/valuefunc (*ConfigFileReader) MustHaveString(keystring) string {
value:=config.String(key)
iflen(value) ==0 {
log.Panic("Config file key not found or has no value: ", key)
}
returnvalue
}
Best
Gabriele
The text was updated successfully, but these errors were encountered:
Hi,
is there any support for panic on missing config keys and values?
Right now I have a wrapper code that calls the config tool with direct reads to accomplish that:
Best
Gabriele
The text was updated successfully, but these errors were encountered: