Added ListenAddr() convenience function.
This commit is contained in:
parent
56d4d7c6bf
commit
273690e5fc
1 changed files with 6 additions and 0 deletions
|
|
@ -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"`
|
||||
|
|
|
|||
Loading…
Reference in a new issue