mirror of
https://github.com/restic/restic.git
synced 2024-12-27 10:17:58 +00:00
15 lines
282 B
Go
15 lines
282 B
Go
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
|
|
}
|