2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-02 19:49:44 +00:00

rename LocationParse -> Parse

This commit is contained in:
Alexander Neumann 2015-12-28 16:42:44 +01:00
parent 3d2a714b5a
commit d257dedf42
2 changed files with 7 additions and 7 deletions

View File

@ -29,11 +29,11 @@ var parsers = []parser{
{"s3", s3.ParseConfig},
}
// ParseLocation parses a repository location from the string s. If s starts with a
// backend name followed by a colon, that backend's Parse() function is called.
// Otherwise, the local backend is used which interprets s as the name of a
// directory.
func ParseLocation(s string) (u Location, err error) {
// Parse extracts repository location information from the string s. If s
// starts with a backend name followed by a colon, that backend's Parse()
// function is called. Otherwise, the local backend is used which interprets s
// as the name of a directory.
func Parse(s string) (u Location, err error) {
scheme := extractScheme(s)
u.Scheme = scheme

View File

@ -64,9 +64,9 @@ var parseTests = []struct {
},
}
func TestParseLocation(t *testing.T) {
func TestParse(t *testing.T) {
for i, test := range parseTests {
u, err := ParseLocation(test.s)
u, err := Parse(test.s)
if err != nil {
t.Errorf("unexpected error: %v", err)
continue