From fee55ba7f8eb09f76ae8bf003873227db6326fed Mon Sep 17 00:00:00 2001 From: Robert Brennan Date: Thu, 2 Jan 2020 20:17:56 +0000 Subject: [PATCH] fix lint errors --- pkg/config/schema.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/config/schema.go b/pkg/config/schema.go index 721e727c..c728ef17 100644 --- a/pkg/config/schema.go +++ b/pkg/config/schema.go @@ -9,6 +9,7 @@ import ( "k8s.io/apimachinery/pkg/api/resource" ) +// TargetKind represents the part of the config to be validated type TargetKind string const ( @@ -29,7 +30,7 @@ type SchemaCheck struct { Target TargetKind `yaml:"target"` SchemaTarget TargetKind `yaml:"schemaTarget"` Schema jsonschema.RootSchema `yaml:"schema"` - JsonSchema string `yaml:"jsonSchema"` + JSONSchema string `yaml:"jsonSchema"` } type resourceMinimum string @@ -114,8 +115,8 @@ func validateRange(path string, limit interface{}, data interface{}, isMinimum b // Initialize sets up the schema func (check *SchemaCheck) Initialize(id string) error { check.ID = id - if check.JsonSchema != "" { - if err := json.Unmarshal([]byte(check.JsonSchema), &check.Schema); err != nil { + if check.JSONSchema != "" { + if err := json.Unmarshal([]byte(check.JSONSchema), &check.Schema); err != nil { return err } }