aboutsummaryrefslogtreecommitdiff
path: root/cmd/galleryd/log.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/galleryd/log.go')
-rw-r--r--cmd/galleryd/log.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/cmd/galleryd/log.go b/cmd/galleryd/log.go
new file mode 100644
index 0000000..08c2065
--- /dev/null
+++ b/cmd/galleryd/log.go
@@ -0,0 +1,15 @@
+package main
+
+import (
+ "fmt"
+ "strings"
+)
+
+func listenURL(addr string) string {
+ switch {
+ case strings.HasPrefix(addr, ":"):
+ return fmt.Sprintf("http://localhost%s", addr)
+ default:
+ return fmt.Sprintf("http://%s", addr)
+ }
+}