Merge pull request #57322 from niuzhenguo/dry-run-flag-cleanup

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Use GetDryRunFlag to keep consistent

**What this PR does / why we need it**:
There's a cmd util GetDryRunFlag, but we still get 'dry-run' directly somewhere. This PR makes them consistent.

**Release note**:

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue
2018-01-29 20:04:54 -08:00
committed by GitHub
10 changed files with 10 additions and 10 deletions

View File

@@ -183,7 +183,7 @@ func (o *CreateOptions) RunCreate(f cmdutil.Factory, cmd *cobra.Command) error {
return err
}
dryRun := cmdutil.GetFlagBool(cmd, "dry-run")
dryRun := cmdutil.GetDryRunFlag(cmd)
output := cmdutil.GetFlagString(cmd, "output")
mapper := r.Mapper().RESTMapper