1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2025-03-23 00:00:04 +01:00
restic/backend/local/config.go

17 lines
306 B
Go

package local
import (
"errors"
"strings"
)
const Scheme = "local"
// 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
}