-
-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathimail.go
More file actions
41 lines (32 loc) · 707 Bytes
/
imail.go
File metadata and controls
41 lines (32 loc) · 707 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package main
import (
"os"
"github.com/urfave/cli"
assets "github.com/midoks/imail/embed"
"github.com/midoks/imail/internal/cmd"
"github.com/midoks/imail/internal/conf"
"github.com/midoks/imail/internal/log"
)
const Version = "0.1.0"
const AppName = "imail"
func init() {
conf.App.Version = Version
conf.App.Name = AppName
conf.App.PublicFs = assets.PublicFS
}
func main() {
app := cli.NewApp()
app.Name = conf.App.Name
app.Version = conf.App.Version
app.Usage = "A simple mail service"
app.Commands = []cli.Command{
cmd.Service,
cmd.Reset,
cmd.Dkim,
cmd.Cert,
cmd.Check,
}
if err := app.Run(os.Args); err != nil {
log.Infof("Failed to start application: %v", err)
}
}