fix issue(11233)enhance kubectl config command

This commit is contained in:
zhengjiajin
2017-09-14 17:14:42 +08:00
parent 8b9f0ea5de
commit e62bc0b7c8
7 changed files with 16 additions and 22 deletions

View File

@@ -17,6 +17,7 @@ limitations under the License.
package config
import (
"fmt"
"io"
"path"
"strconv"
@@ -81,3 +82,9 @@ func toBool(propertyValue string) (bool, error) {
return boolValue, nil
}
func helpErrorf(cmd *cobra.Command, format string, args ...interface{}) error {
cmd.Help()
msg := fmt.Sprintf(format, args...)
return fmt.Errorf("%s\n", msg)
}