Skip to content

Commit

Permalink
Adds shorthand for overwrite and script engine args.
Browse files Browse the repository at this point in the history
  • Loading branch information
outofcoffee committed Sep 10, 2021
1 parent 67a8ed2 commit 673fa11
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ Usage:
imposter scaffold [CONFIG_DIR] [flags]
Flags:
--force-overwrite Force overwrite destination file(s) if already exist
-f --force-overwrite Force overwrite of destination file(s) if already exist
--generate-resources Generate Imposter resources from OpenAPI paths (default true)
--script-engine string Generate placeholder Imposter script (none|groovy|js) (default "none")
-s --script-engine string Generate placeholder Imposter script (none|groovy|js) (default "none")
```

Help:
Expand Down
4 changes: 2 additions & 2 deletions cmd/scaffold.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ If CONFIG_DIR is not specified, the current working directory is used.`,
}

func init() {
scaffoldCmd.Flags().BoolVar(&flagForceOverwrite, "force-overwrite", false, "Force overwrite destination file(s) if already exist")
scaffoldCmd.Flags().BoolVarP(&flagForceOverwrite, "force-overwrite", "f", false, "Force overwrite of destination file(s) if already exist")
scaffoldCmd.Flags().BoolVar(&flagGenerateResources, "generate-resources", true, "Generate Imposter resources from OpenAPI paths")
scaffoldCmd.Flags().StringVar(&flagScriptEngine, "script-engine", "none", "Generate placeholder Imposter script (none|groovy|js)")
scaffoldCmd.Flags().StringVarP(&flagScriptEngine, "script-engine", "s", "none", "Generate placeholder Imposter script (none|groovy|js)")
rootCmd.AddCommand(scaffoldCmd)
}

Expand Down

0 comments on commit 673fa11

Please sign in to comment.