aboutsummaryrefslogtreecommitdiff
path: root/cmd/koushin/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/koushin/main.go')
-rw-r--r--cmd/koushin/main.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/cmd/koushin/main.go b/cmd/koushin/main.go
index 472cd4a..d22b404 100644
--- a/cmd/koushin/main.go
+++ b/cmd/koushin/main.go
@@ -22,20 +22,18 @@ func main() {
flag.StringVar(&addr, "addr", ":1323", "listening address")
flag.Usage = func() {
- fmt.Fprintf(flag.CommandLine.Output(), "usage: koushin [options...] <IMAP URL> [SMTP URL]\n")
+ fmt.Fprintf(flag.CommandLine.Output(), "usage: koushin [options...] <upstream server...>\n")
flag.PrintDefaults()
}
flag.Parse()
- if flag.NArg() < 1 || flag.NArg() > 2 {
+ options.Upstreams = flag.Args()
+ if len(options.Upstreams) == 0 {
flag.Usage()
return
}
- options.IMAPURL = flag.Arg(0)
- options.SMTPURL = flag.Arg(1)
-
e := echo.New()
e.HideBanner = true
if l, ok := e.Logger.(*log.Logger); ok {