diff --git a/internal/settings/settings.go b/internal/settings/settings.go index 25ec8b8..f6054aa 100644 --- a/internal/settings/settings.go +++ b/internal/settings/settings.go @@ -2,7 +2,9 @@ package settings import ( "bytes" + "fmt" "io/fs" + "net" "os" "github.com/pelletier/go-toml" @@ -47,6 +49,10 @@ type Webhook struct { Host string `toml:"host"` } +func (w *Webhook) ListenAddr() string { + return net.JoinHostPort(w.Host, fmt.Sprintf("%d", w.Port)) +} + type Translations struct { BaseDir string `toml:"basedir"` Current string `toml:"current"`