mirror of
https://github.com/restic/restic.git
synced 2025-10-09 19:10:25 +00:00
backend: let ParseConfig return concrete type
This commit is contained in:
@@ -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()
|
||||
|
Reference in New Issue
Block a user