add Addr.Hostname() and Addr.Port()

This commit is contained in:
AJ ONeal 2020-05-20 01:49:08 -06:00
parent 73998a9403
commit 6621ccf47e
1 changed files with 8 additions and 0 deletions

View File

@ -46,6 +46,14 @@ func (a *Addr) Network() string {
return a.addr + ":" + strconv.Itoa(a.port)
}
func (a *Addr) Port() int {
return a.port
}
func (a *Addr) Hostname() string {
return a.addr
}
func (a *Addr) Scheme() Scheme {
return a.scheme
}