adding uri to string method

This commit is contained in:
Michael Baird 2017-11-06 14:08:01 -06:00
parent 1283263b70
commit 64da894e7e

5
uri.go
View file

@ -134,6 +134,11 @@ func (u *URI) Normalize() string {
return fmt.Sprintf("%s://%s:%d", scheme, u.host, u.port)
}
// String returns the address as a string.
func (u URI) String() string {
return fmt.Sprintf("%s://%s:%d", u.scheme, u.host, u.port)
}
// Equals returns true if the checked URI is equivalent to this URI.
func (u URI) Equals(other *URI) bool {
if other == nil {