Added ListenAddr() convenience function.

This commit is contained in:
Benjamin A. Shelton 2026-10-02 18:00:29 -06:00
commit 273690e5fc
Signed by: zancarius
GPG key ID: 8BD42DBD6C337E01

View file

@ -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"`