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

@ -17,7 +17,7 @@ import (
type tinyConfig map[string]string
func (c tinyConfig) Get(host, key string) (string, error) {
func (c tinyConfig) GetOrDefault(host, key string) (string, error) {
return c[fmt.Sprintf("%s:%s", host, key)], nil
}