func changeSharedFlagDefaults(rootCmd *cobra.Command) {
	cmds := []*cobra.Command{rootCmd}

	for i := 0; i < len(cmds); i++ {
		currCmd := cmds[i]
		cmds = append(cmds, currCmd.Commands()...)

		if showAllFlag := currCmd.Flags().Lookup("show-all"); showAllFlag != nil {
			showAllFlag.DefValue = "true"
			showAllFlag.Value.Set("true")
			showAllFlag.Changed = false
			showAllFlag.Usage = "When printing, show all resources (false means hide terminated pods.)"
		}

		// we want to disable the --validate flag by default when we're running kube commands from oc.  We want to make sure
		// that we're only getting the upstream --validate flags, so check both the flag and the usage
		if validateFlag := currCmd.Flags().Lookup("validate"); (validateFlag != nil) && (validateFlag.Usage == "If true, use a schema to validate the input before sending it") {
			validateFlag.DefValue = "false"
			validateFlag.Value.Set("false")
			validateFlag.Changed = false
		}
	}
}
// changeSharedFlagDefaults changes values of shared flags that we disagree with.  This can't be done in godep code because
// that would change behavior in our `kubectl` symlink. Defend each change.
// 1. show-all - the most interesting pods are terminated/failed pods.  We don't want to exclude them from printing
changeSharedFlagDefaults changes values of shared flags that we disagree with.  This can't be done in godep code because
that would change behavior in our `kubectl` symlink. Defend each change.
1. show-all - the most interesting pods are terminated/failed pods.  We don't want to exclude them from printing
// changeSharedFlagDefaults changes values of shared flags that we disagree with . This can ' t be done in godep code because // that would change behavior in our ` kubectl ` symlink . Defend each change . // 1 . show - all - the most interesting pods are terminated / failed pods . We don ' t want to exclude them from printing
func changeSharedFlagDefaults(rootCmd *cobra.Command) {
	cmds := []*cobra.Command{rootCmd}
	for i := 0; i < len(cmds); i++ {
		currCmd := cmds[i]
		cmds = append(cmds, currCmd.Commands()...)
		if showAllFlag := currCmd.Flags().Lookup("show-all"); showAllFlag != nil {
			showAllFlag.DefValue = "true"
			showAllFlag.Value.Set("true")
			showAllFlag.Changed = false
			showAllFlag.Usage = "When printing, show all resources (false means hide terminated pods.)"
		}
		if validateFlag := currCmd.Flags().Lookup("validate"); (validateFlag != nil) && (validateFlag.Usage == "If true, use a schema to validate the input before sending it") {
			validateFlag.DefValue = "false"
			validateFlag.Value.Set("false")
			validateFlag.Changed = false
		}
	}
}
func changeSharedFlagDefaults ( rootCmd * cobra . Command ) { cmds := [ ] * cobra . Command { rootCmd } for i := 0 ; i < len ( cmds ) ; i ++ { currCmd := cmds [ i ] cmds = append ( cmds , currCmd . Commands ( ) ... ) if showAllFlag := currCmd . Flags ( ) . Lookup ( " " ) ; showAllFlag != nil { showAllFlag . DefValue = " " showAllFlag . Value . Set ( " " ) showAllFlag . Changed = false showAllFlag . Usage = " " } if validateFlag := currCmd . Flags ( ) . Lookup ( " " ) ; ( validateFlag != nil ) && ( validateFlag . Usage == " " ) { validateFlag . DefValue = " " validateFlag . Value . Set ( " " ) validateFlag . Changed = false } } }
changeSharedFlagDefaults changes values of shared flags that we disagree with.
changeSharedFlagDefaults changes values of shared flags that we disagree with .
// we want to disable the --validate flag by default when we're running kube commands from oc.  We want to make sure // that we're only getting the upstream --validate flags, so check both the flag and the usage