add GetOrDefault functionality to config
This commit is contained in:
parent
eaa64df801
commit
562f1b3d0d
33 changed files with 116 additions and 58 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue