Update comment for SplitHostPort
This commit is contained in:
parent
497e99d58b
commit
ad69440af1
@ -32,8 +32,7 @@ func main() {
|
||||
fmt.Println(p)
|
||||
|
||||
// The `Host` contains both the hostname and the port,
|
||||
// if present. `Split` the `Host` manually to extract
|
||||
// the port.
|
||||
// if present. Use `SplitHostPort` to extract them.
|
||||
fmt.Println(u.Host)
|
||||
host, port, _ := net.SplitHostPort(u.Host)
|
||||
fmt.Println(host)
|
||||
|
Loading…
x
Reference in New Issue
Block a user