cmd/koushin: add -addr flag

This commit is contained in:
Simon Ser 2020-01-08 12:01:50 +01:00
parent 04199eb121
commit 171da51289
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48

View file

@ -17,7 +17,9 @@ import (
func main() {
var options koushin.Options
var addr string
flag.StringVar(&options.Theme, "theme", "", "default theme")
flag.StringVar(&addr, "addr", ":1323", "listening address")
flag.Usage = func() {
fmt.Fprintf(flag.CommandLine.Output(), "usage: koushin [options...] <IMAP URL> [SMTP URL]\n")
@ -54,5 +56,5 @@ func main() {
}
}()
e.Logger.Fatal(e.Start(":1323"))
e.Logger.Fatal(e.Start(addr))
}