Skip to content
Myr

Update README.md

Before adoption: this commit came in with the history the project adopted, so no landing records it.

To avoid confusion, it is better to use `localCmd` instead of `rootCmd`

authored by Go Frendi Gunawan · committed by Steve Francia · parent 9eb9f5c · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:README.md+1 added-1 removed
336 unmodified lines
337338A flag can also be assigned locally which will only apply to that specific command.339340```go341rootCmd.Flags().StringVarP(&Source, "source", "s", "", "Source directory to read from")341localCmd.Flags().StringVarP(&Source, "source", "s", "", "Source directory to read from")342```343344### Local Flag on Parent Commands345
396 unmodified lines