Skip to content

Commit 5d0d709

Browse files
danicatbradfitz
authored andcommitted
net: replaces "hostname" with "host name" in the proxy package
Updates golang/go#17613 Change-Id: I0b272c19c263f20084a936b5122bb3cfebacc752 Reviewed-on: https://go-review.googlesource.com/49750 Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent b3756b4 commit 5d0d709

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

proxy/per_host.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"strings"
1010
)
1111

12-
// A PerHost directs connections to a default Dialer unless the hostname
12+
// A PerHost directs connections to a default Dialer unless the host name
1313
// requested matches one of a number of exceptions.
1414
type PerHost struct {
1515
def, bypass Dialer
@@ -76,7 +76,7 @@ func (p *PerHost) dialerForRequest(host string) Dialer {
7676

7777
// AddFromString parses a string that contains comma-separated values
7878
// specifying hosts that should use the bypass proxy. Each value is either an
79-
// IP address, a CIDR range, a zone (*.example.com) or a hostname
79+
// IP address, a CIDR range, a zone (*.example.com) or a host name
8080
// (localhost). A best effort is made to parse the string and errors are
8181
// ignored.
8282
func (p *PerHost) AddFromString(s string) {
@@ -131,7 +131,7 @@ func (p *PerHost) AddZone(zone string) {
131131
p.bypassZones = append(p.bypassZones, zone)
132132
}
133133

134-
// AddHost specifies a hostname that will use the bypass proxy.
134+
// AddHost specifies a host name that will use the bypass proxy.
135135
func (p *PerHost) AddHost(host string) {
136136
if strings.HasSuffix(host, ".") {
137137
host = host[:len(host)-1]

proxy/socks5.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ func (s *socks5) connect(conn net.Conn, target string) error {
154154
buf = append(buf, ip...)
155155
} else {
156156
if len(host) > 255 {
157-
return errors.New("proxy: destination hostname too long: " + host)
157+
return errors.New("proxy: destination host name too long: " + host)
158158
}
159159
buf = append(buf, socks5Domain)
160160
buf = append(buf, byte(len(host)))

0 commit comments

Comments
 (0)