Compare commits
1 Commits
67e8485958
...
0219bbc5fb
Author | SHA1 | Date |
---|---|---|
Philippe Caseiro | 0219bbc5fb |
|
@ -25,12 +25,12 @@ func Daemon(port int) (err error) {
|
|||
func main() {
|
||||
|
||||
var args struct {
|
||||
Daemon bool `arg:"-d,--daemon,env:TEMPLATER_DAEMON" default:"false" help:"Enable api server"`
|
||||
Port int `arg:"-p,--port,env:TEMPLATER_PORT" default:"8080" help:"Listening port for the api server"`
|
||||
Type string `arg:"-t,--type,env:TEMPLATE_TYPE" default:"hcl" help:"Template type (go/template or hcl)"`
|
||||
Output string `arg:"-o,--output,env:TEMPLATER_OUTPUT" default:"stdout" help:"Destination of the result (stdout or file path)"`
|
||||
Config string `arg:"-c,--config,env:TEMPLATE_CONFIG" help:"Configuration values"`
|
||||
File string `arg:"-f,--template-file,env:TEMPLATE_FILE" help:"Template file path"`
|
||||
Daemon bool `arg:"-d,--daemon,env:TEMPLATER_DAEMON" default:"false"`
|
||||
Port int `arg:"-p,--port,env:TEMPLATER_PORT" default:"8080"`
|
||||
Type string `arg:"-t,--type,env:TEMPLATE_TYPE" default:"hcl"`
|
||||
File string `arg:"-f,--template-file,env:TEMPLATE_FILE"`
|
||||
Output string `arg:"-o,--output,env:TEMPLATER_OUTPUT" default:"stdout"`
|
||||
Config string `arg:"-c,--config,env:TEMPLATE_CONFIG"`
|
||||
}
|
||||
|
||||
arg.MustParse(&args)
|
||||
|
|
Loading…
Reference in New Issue