mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 16:24:37 +03:00
update to latest adns, synced with Go's net
This commit is contained in:
4
vendor/github.com/mjl-/adns/ipsock.go
generated
vendored
4
vendor/github.com/mjl-/adns/ipsock.go
generated
vendored
@ -68,7 +68,7 @@ func SplitHostPort(hostport string) (host, port string, err error) {
|
||||
j, k := 0, 0
|
||||
|
||||
// The port starts after the last colon.
|
||||
i := last(hostport, ':')
|
||||
i := bytealg.LastIndexByteString(hostport, ':')
|
||||
if i < 0 {
|
||||
return addrErr(hostport, missingPort)
|
||||
}
|
||||
@ -115,7 +115,7 @@ func SplitHostPort(hostport string) (host, port string, err error) {
|
||||
func splitHostZone(s string) (host, zone string) {
|
||||
// The IPv6 scoped addressing zone identifier starts after the
|
||||
// last percent sign.
|
||||
if i := last(s, '%'); i > 0 {
|
||||
if i := bytealg.LastIndexByteString(s, '%'); i > 0 {
|
||||
host, zone = s[:i], s[i+1:]
|
||||
} else {
|
||||
host = s
|
||||
|
Reference in New Issue
Block a user