1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-28 19:01:08 +00:00
restic/backend/local/config.go

16 lines
282 B
Go
Raw Normal View History

2015-12-28 14:51:24 +00:00
package local
import (
"errors"
"strings"
)
// ParseConfig parses a local backend config.
func ParseConfig(cfg string) (interface{}, error) {
if !strings.HasPrefix(cfg, "local:") {
return nil, errors.New(`invalid format, prefix "local" not found`)
}
return cfg[6:], nil
}