-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.go
56 lines (53 loc) · 1.18 KB
/
config.go
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package main
import (
"gopkg.in/urfave/cli.v1"
)
const appVersion = "0.0.1"
var appFlags = []cli.Flag{
cli.StringFlag{
Name: "from-name",
Usage: "Display name for sender",
Value: "Secret Santa Robotic Elf",
},
cli.StringFlag{
Name: "from-address",
Usage: "Email address to send from (required unless dry run)",
},
cli.StringFlag{
Name: "from-password",
Usage: "Password for the from-address (e.g. gmail password)",
},
cli.StringFlag{
Name: "smtp-host",
Usage: "Host to send to",
Value: "smtp.gmail.com",
},
cli.IntFlag{
Name: "smtp-port",
Usage: "Port to send to",
Value: 587,
},
cli.StringFlag{
Name: "source-file",
Usage: "JSON file containing an array of name/address objects",
Value: "data/people.json",
},
cli.StringFlag{
Name: "template-file",
Usage: "Text file containing a template used for the email body",
Value: "data/email.template",
},
cli.StringFlag{
Name: "subject",
Usage: "Email subject",
Value: "Shhhh! It's your Secret Santa assignment",
},
cli.BoolFlag{
Name: "show-matches",
Usage: "Print the pairings out when sending",
},
cli.BoolFlag{
Name: "dry-run",
Usage: "Do not send. Implies --show-matches",
},
}