mirror of
https://github.com/yannh/kubeconform.git
synced 2026-04-15 16:59:51 +00:00
add -dir parameter
This commit is contained in:
parent
81aca53a84
commit
2786a84a4c
5 changed files with 84 additions and 30 deletions
|
|
@ -18,12 +18,13 @@ func (f ValidFormat) IsFormat(input interface{}) bool {
|
|||
return true
|
||||
}
|
||||
|
||||
func init () {
|
||||
gojsonschema.FormatCheckers.Add("int64", ValidFormat{})
|
||||
gojsonschema.FormatCheckers.Add("byte", ValidFormat{})
|
||||
gojsonschema.FormatCheckers.Add("int32", ValidFormat{})
|
||||
gojsonschema.FormatCheckers.Add("int-or-string", ValidFormat{})
|
||||
}
|
||||
// From kubeval - let's see if absolutely necessary
|
||||
// func init () {
|
||||
// gojsonschema.FormatCheckers.Add("int64", ValidFormat{})
|
||||
// gojsonschema.FormatCheckers.Add("byte", ValidFormat{})
|
||||
// gojsonschema.FormatCheckers.Add("int32", ValidFormat{})
|
||||
// gojsonschema.FormatCheckers.Add("int-or-string", ValidFormat{})
|
||||
// }
|
||||
|
||||
func Validate(rawResource []byte, rawSchema []byte) error {
|
||||
schemaLoader := gojsonschema.NewBytesLoader(rawSchema)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue