mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 15:37:24 +00:00
Make --validate default on and shows how to turn if off
This commit is contained in:
@@ -259,6 +259,10 @@ func GetFlagDuration(cmd *cobra.Command, flag string) time.Duration {
|
||||
return d
|
||||
}
|
||||
|
||||
func AddValidateFlag(cmd *cobra.Command) {
|
||||
cmd.Flags().Bool("validate", true, "If true, use a schema to validate the input before sending it")
|
||||
}
|
||||
|
||||
func ReadConfigDataFromReader(reader io.Reader, source string) ([]byte, error) {
|
||||
data, err := ioutil.ReadAll(reader)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user