backend: let ParseConfig return concrete type

This commit is contained in:
Michael Eischer
2023-04-20 22:40:21 +02:00
parent 2f7b4ceae1
commit 5260d38980
17 changed files with 55 additions and 62 deletions

View File

@@ -27,9 +27,9 @@ func init() {
}
// ParseConfig parses a local backend config.
func ParseConfig(s string) (interface{}, error) {
func ParseConfig(s string) (Config, error) {
if !strings.HasPrefix(s, "local:") {
return nil, errors.New(`invalid format, prefix "local" not found`)
return Config{}, errors.New(`invalid format, prefix "local" not found`)
}
cfg := NewConfig()