add GetOrDefault functionality to config

This commit is contained in:
nate smith 2022-01-11 14:56:58 -06:00
parent eaa64df801
commit 562f1b3d0d
33 changed files with 116 additions and 58 deletions

View file

@ -24,7 +24,7 @@ func CheckAuth(cfg config.Config) bool {
}
for _, hostname := range hosts {
token, _ := cfg.Get(hostname, "oauth_token")
token, _ := cfg.GetOrDefault(hostname, "oauth_token")
if token != "" {
return true
}