diff --git a/config/provider/inmem.go b/config/provider/inmem.go index 0c56f7b5..0b56b795 100644 --- a/config/provider/inmem.go +++ b/config/provider/inmem.go @@ -16,9 +16,8 @@ package provider import ( "sync" - + "encoding/json" "github.com/layer5io/meshkit/config" - "github.com/layer5io/meshkit/encoding" "github.com/layer5io/meshkit/utils" ) @@ -55,7 +54,7 @@ func (l *InMem) GetKey(key string) string { func (l *InMem) GetObject(key string, result interface{}) error { l.mutex.Lock() defer l.mutex.Unlock() - return encoding.Unmarshal([]byte(l.store[key]), result) + return json.Unmarshal([]byte(l.store[key]), result) } // SetObject sets an object value for the key diff --git a/utils/kubernetes/crd.go b/utils/kubernetes/crd.go index 0525a624..e3a244fc 100644 --- a/utils/kubernetes/crd.go +++ b/utils/kubernetes/crd.go @@ -2,8 +2,7 @@ package kubernetes import ( "context" - - "github.com/layer5io/meshkit/encoding" + "encoding/json" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/client-go/rest" ) @@ -35,7 +34,7 @@ func GetAllCustomResourcesInCluster(ctx context.Context, client rest.Interface) } var xcrd CRD gvks := []*schema.GroupVersionResource{} - err = encoding.Unmarshal(crdresult, &xcrd) + err = json.Unmarshal(crdresult, &xcrd) if err != nil { return nil, err } diff --git a/validator/validate.go b/validator/validate.go index e91aca19..69aaddd6 100644 --- a/validator/validate.go +++ b/validator/validate.go @@ -14,7 +14,6 @@ import ( var ( ErrValidateCode = "" - _ = "components.schemas" cueschema cue.Value mx sync.Mutex isSchemaLoaded bool