Skip to content

Commit

Permalink
remove single-character flags and add a default for configFile
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinblack committed May 20, 2024
1 parent c4e4a3e commit d121f8f
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions cmd/arcaflow/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func main() {
Stdout: os.Stderr,
})

configFile := ""
configFile := "config.yaml"
input := ""
dir := "."
workflowFile := "workflow.yaml"
Expand All @@ -71,15 +71,10 @@ func main() {
Defaults to workflow.yaml.`
)
flag.BoolVar(&printVersion, "version", printVersion, versionUsage)
flag.BoolVar(&printVersion, "v", printVersion, versionUsage)
flag.StringVar(&configFile, "config", configFile, configUsage)
flag.StringVar(&configFile, "c", configFile, configUsage)
flag.StringVar(&input, "input", input, inputUsage)
flag.StringVar(&input, "i", input, inputUsage)
flag.StringVar(&dir, "context", dir, contextUsage)
flag.StringVar(&dir, "x", dir, contextUsage)
flag.StringVar(&workflowFile, "workflow", workflowFile, workflowUsage)
flag.StringVar(&workflowFile, "w", workflowFile, workflowUsage)

flag.Usage = func() {
_, _ = os.Stderr.Write([]byte(`Usage: arcaflow [OPTIONS]
Expand All @@ -88,12 +83,12 @@ The Arcaflow engine will read the current directory and use it as a context
for executing the workflow.
Options:
-h, --help ` + helpUsage + `
-v, --version ` + versionUsage + `
-c, --config FILENAME ` + configUsage + `
-i, --input FILENAME ` + inputUsage + `
-x, --context DIRECTORY ` + contextUsage + `
-w, --workflow FILENAME ` + workflowUsage + `
-help ` + helpUsage + `
-version ` + versionUsage + `
-config FILENAME ` + configUsage + `
-input FILENAME ` + inputUsage + `
-context DIRECTORY ` + contextUsage + `
-workflow FILENAME ` + workflowUsage + `
`))
}
flag.Parse()
Expand Down

0 comments on commit d121f8f

Please sign in to comment.