Spec validation option (#1865)
Co-authored-by: Rahul Bhati <rjbhati009@gmail.com> Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
This commit is contained in:
co-authored by
Rahul Bhati
Vishal
parent
f28799cc4c
commit
6f9bad3d05
@@ -316,6 +316,18 @@ func GetSpecDir(input cli.Input) string {
|
||||
return specDir
|
||||
}
|
||||
|
||||
func GetValidationFlag(input cli.Input) bool {
|
||||
validationFlag := input.String(flagkey.SpecValidate)
|
||||
// if flag has not been set, we return true to turn on validation by default
|
||||
if len(validationFlag) == 0 {
|
||||
return true
|
||||
}
|
||||
if validationFlag == "false" {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// UpdateMapFromStringSlice parses key, val from "key=val" string array and updates passed map
|
||||
func UpdateMapFromStringSlice(dataMap *map[string]string, params []string) bool {
|
||||
updated := false
|
||||
|
||||
Reference in New Issue
Block a user