mirror of
https://github.com/yudai/gotty.git
synced 2025-12-24 19:30:13 +01:00
Fix printing ipv6 with brackets
This commit is contained in:
parent
a080c85cbc
commit
fd0ccc1f0b
1 changed files with 2 additions and 2 deletions
|
|
@ -127,10 +127,10 @@ func (server *Server) Run(ctx context.Context, options ...RunOption) error {
|
|||
scheme = "https"
|
||||
}
|
||||
host, port, _ := net.SplitHostPort(listener.Addr().String())
|
||||
log.Printf("HTTP server is listening at: %s", scheme+"://"+host+":"+port+path)
|
||||
log.Printf("HTTP server is listening at: %s", scheme+"://"+net.JoinHostPort(host, port)+path)
|
||||
if server.options.Address == "0.0.0.0" {
|
||||
for _, address := range listAddresses() {
|
||||
log.Printf("Alternative URL: %s", scheme+"://"+address+":"+port+path)
|
||||
log.Printf("Alternative URL: %s", scheme+"://"+net.JoinHostPort(address, port)+path)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue