fix issue(11233)enhance kubectl config command
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user