about summary refs log tree commit diff stats
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/server/main.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd/server/main.go b/cmd/server/main.go
index ca69ba2..be36e3b 100644
--- a/cmd/server/main.go
+++ b/cmd/server/main.go
@@ -6,8 +6,8 @@ import (
 	"os"
 	"os/signal"
 
-	"go.alanpearce.eu/x/log"
 	"go.alanpearce.eu/website/internal/server"
+	"go.alanpearce.eu/x/log"
 
 	"github.com/ardanlabs/conf/v3"
 	"gitlab.com/tozd/go/errors"
@@ -25,6 +25,10 @@ func main() {
 	}
 	log := log.Configure(!runtimeConfig.Development)
 
+	if listenAddress := runtimeConfig.ListenAddress; listenAddress[0] == '[' {
+		runtimeConfig.ListenAddress = listenAddress[1 : len(listenAddress)-1]
+	}
+
 	if runtimeConfig.Development {
 		tmpdir, err := os.MkdirTemp("", "website")
 		if err != nil {