mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
Unexport URI.Normalize
This commit is contained in:
parent
a7c1795cf7
commit
6f256e0edb
2 changed files with 4 additions and 4 deletions
6
uri.go
6
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.
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue