-
Notifications
You must be signed in to change notification settings - Fork 0
/
flags.go
32 lines (26 loc) · 802 Bytes
/
flags.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
package main
import (
"flag"
"os"
)
var (
flagBaseResumeFile string
flagSecretResumeFile string
flagControlsFile string
flagGeneratedPdf string
flagShowHelp bool
)
func initFlags() {
flag.StringVar(&flagBaseResumeFile, "base-resume", "conf/resume/base.yaml", "Path to base resume file to use")
flag.StringVar(&flagSecretResumeFile, "secret-resume", "conf/resume/secret.yaml", "Path to secret resume file to use")
flag.StringVar(&flagControlsFile, "controls", "conf/controls/default.yaml", "Path to the controls file to use")
flag.StringVar(&flagGeneratedPdf, "output-pdf", "", "The filename to use for the generated PDF")
flag.BoolVar(&flagShowHelp, "help", false, "Show help")
}
func parseFlags() {
flag.Parse()
if flagShowHelp {
flag.Usage()
os.Exit(0)
}
}