Skip to content

Commit 1d071c0

Browse files
committed
net/addr: add getter/setter for hostname
1 parent c06957d commit 1d071c0

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

net/addr.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,14 @@ func (a Addr) RemoveScheme() Addr {
9494
func (a Addr) GetScheme() string {
9595
return a.scheme
9696
}
97+
98+
// GetHostname returns the hostname
99+
func (a Addr) GetHostname() string {
100+
return a.hostname
101+
}
102+
103+
// SetHostname sets hostname
104+
func (a Addr) SetHostname(hostname string) Addr {
105+
a.hostname = hostname
106+
return a
107+
}

0 commit comments

Comments
 (0)