aboutsummaryrefslogtreecommitdiff
path: root/cmd/galleryd/log.go
blob: 08c2065399efa3fc201c71e63c629173e259ccfd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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)
	}
}