Skip to content

Commit

Permalink
fix lint issue
Browse files Browse the repository at this point in the history
Signed-off-by: MUzairS15 <muzair.shaikh810@gmail.com>
  • Loading branch information
MUzairS15 committed Sep 19, 2024
1 parent aedcb7f commit 1bb16d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion config/provider/inmem.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"sync"

"github.com/layer5io/meshkit/config"
"github.com/layer5io/meshkit/encoding"
"github.com/layer5io/meshkit/utils"
)

Expand Down Expand Up @@ -54,7 +55,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 utils.Unmarshal(l.store[key], result)
return encoding.Unmarshal([]byte(l.store[key]), result)
}

// SetObject sets an object value for the key
Expand Down
4 changes: 2 additions & 2 deletions utils/kubernetes/crd.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package kubernetes
import (
"context"

"github.com/layer5io/meshkit/utils"
"github.com/layer5io/meshkit/encoding"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/client-go/rest"
)
Expand Down Expand Up @@ -35,7 +35,7 @@ func GetAllCustomResourcesInCluster(ctx context.Context, client rest.Interface)
}
var xcrd CRD
gvks := []*schema.GroupVersionResource{}
err = utils.Unmarshal(string(crdresult), &xcrd)
err = encoding.Unmarshal(crdresult, &xcrd)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 1bb16d7

Please sign in to comment.