Skip to content

Commit cfdf7fb

Browse files
Serhii PonomarovSerhii Ponomarov
authored andcommitted
Simplify listenAddr
1 parent 2f46820 commit cfdf7fb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmd/sshfront/sshfront.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ func main() {
5252
}
5353
SetupHostKey(config)
5454

55-
var listenAddr string
56-
if listenAddr = os.Getenv("SSHFRONT_LISTEN"); listenAddr == "" {
57-
listenAddr = fmt.Sprintf("%s:%s", *ListenHost, *ListenPort)
55+
listenAddr := os.Getenv("SSHFRONT_LISTEN")
56+
if listenAddr == "" {
57+
listenAddr = net.JoinHostPort(*ListenHost, *ListenPort)
5858
}
5959

6060
log.Printf("sshfront v%s listening on %s ...\n", Version, listenAddr)

0 commit comments

Comments
 (0)