From 6f256e0edbcf4613190dbad66eae1db7591fb78d Mon Sep 17 00:00:00 2001 From: Cody Soyland Date: Thu, 5 Jul 2018 21:55:31 -0500 Subject: [PATCH] Unexport URI.Normalize --- uri.go | 6 +++--- uri_internal_test.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/uri.go b/uri.go index 332166b4e..605e5cb82 100644 --- a/uri.go +++ b/uri.go @@ -117,8 +117,8 @@ func (u *URI) HostPort() string { return s } -// Normalize returns the address in a form usable by a HTTP client. -func (u *URI) Normalize() string { +// normalize returns the address in a form usable by a HTTP client. +func (u *URI) normalize() string { scheme := u.Scheme index := strings.Index(scheme, "+") if index >= 0 { @@ -134,7 +134,7 @@ func (u URI) String() string { // Path returns URI with path func (u *URI) Path(path string) string { - return fmt.Sprintf("%s%s", u.Normalize(), path) + return fmt.Sprintf("%s%s", u.normalize(), path) } // The following methods are required to implement pflag Value interface. diff --git a/uri_internal_test.go b/uri_internal_test.go index 64db3fd8e..4d2500010 100644 --- a/uri_internal_test.go +++ b/uri_internal_test.go @@ -60,7 +60,7 @@ func TestNormalizedAddress(t *testing.T) { if err != nil { t.Fatalf("Can't parse address") } - if uri.Normalize() != "http://big-data.pilosa.com:6888" { + if uri.normalize() != "http://big-data.pilosa.com:6888" { t.Fatalf("Normalized address is not normal") } }