Skip to content

Commit

Permalink
Merge pull request #2 from MasteryConnect/add-environment-vars
Browse files Browse the repository at this point in the history
Added environment variables to the commandline to make it easier to c…
  • Loading branch information
danielcbaldwin committed Nov 19, 2015
2 parents 93f14be + 39a3f09 commit 4da87ce
Showing 1 changed file with 24 additions and 18 deletions.
42 changes: 24 additions & 18 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,34 +49,40 @@ SOFTWARE.
`
app.Flags = []cli.Flag{
cli.StringFlag{
Name: "seconds",
Value: "*",
Usage: "seconds: 0-59, */10",
Name: "seconds",
Value: "*",
Usage: "seconds: 0-59, */10",
EnvVar: "DC_SECS",
},
cli.StringFlag{
Name: "minutes",
Value: "*",
Usage: "minutes: 0-59, */10",
Name: "minutes",
Value: "*",
Usage: "minutes: 0-59, */10",
EnvVar: "DC_MINS",
},
cli.StringFlag{
Name: "hours",
Value: "*",
Usage: "hours: 0-23, */10",
Name: "hours",
Value: "*",
Usage: "hours: 0-23, */10",
EnvVar: "DC_HOURS",
},
cli.StringFlag{
Name: "day-of-month",
Value: "*",
Usage: "day of month: 1-31",
Name: "day-of-month",
Value: "*",
Usage: "day of month: 1-31",
EnvVar: "DC_DOM",
},
cli.StringFlag{
Name: "months",
Value: "*",
Usage: "month: 1-12 or JAN-DEC, */10",
Name: "months",
Value: "*",
Usage: "month: 1-12 or JAN-DEC, */10",
EnvVar: "DC_MONTHS",
},
cli.StringFlag{
Name: "day-of-week",
Value: "*",
Usage: "day of week: 0-6 or SUN-SAT",
Name: "day-of-week",
Value: "*",
Usage: "day of week: 0-6 or SUN-SAT",
EnvVar: "DC_DOW",
},
}
app.Action = func(con *cli.Context) {
Expand Down

0 comments on commit 4da87ce

Please sign in to comment.