From d257dedf42014e5030cd99ffff1576ccfc082821 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Mon, 28 Dec 2015 16:42:44 +0100 Subject: [PATCH] rename LocationParse -> Parse --- location/location.go | 10 +++++----- location/location_test.go | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/location/location.go b/location/location.go index a4b344000..1f3aba1a4 100644 --- a/location/location.go +++ b/location/location.go @@ -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 diff --git a/location/location_test.go b/location/location_test.go index 096f0fa16..fedc66e85 100644 --- a/location/location_test.go +++ b/location/location_test.go @@ -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