Skip to content

Commit

Permalink
gofmt
Browse files Browse the repository at this point in the history
  • Loading branch information
tegk committed Nov 18, 2019
1 parent b36222d commit 36cbb0e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -1411,14 +1411,14 @@ func (s *StanServer) buildServerURLs() ([]string, error) {
// use 127.0.0.1 or ::1 for host address (important for
// Windows since connect with 0.0.0.0 or :: fails).
sport := strconv.Itoa(opts.Port)
switch opts.Host {
case "0.0.0.0":
hostport = net.JoinHostPort("127.0.0.1", sport)
case "::", "[::]":
hostport = net.JoinHostPort("::1", sport)
default:
hostport = net.JoinHostPort(opts.Host, sport)
}
switch opts.Host {
case "0.0.0.0":
hostport = net.JoinHostPort("127.0.0.1", sport)
case "::", "[::]":
hostport = net.JoinHostPort("::1", sport)
default:
hostport = net.JoinHostPort(opts.Host, sport)
}
}
return []string{fmt.Sprintf("nats://%s", hostport)}, nil
}
Expand Down

0 comments on commit 36cbb0e

Please sign in to comment.