Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pkg/config/autodiscover/autodiscover.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package autodiscover

import (
"encoding/json"
"fmt"
"os"
"path"
Expand Down Expand Up @@ -106,7 +105,7 @@ func executeOcGetCommand(resourceType, labelQuery, namespace string) (string, er
matches := genericTest.Matches
gomega.Expect(len(matches)).To(gomega.Equal(1))
match := genericTest.GetMatches()[0]
err = json.Unmarshal([]byte(match.Match), &commandDriver)
err = jsonUnmarshal([]byte(match.Match), &commandDriver)
gomega.Expect(err).To(gomega.BeNil())
return match.Match, err
}
Expand Down
3 changes: 1 addition & 2 deletions pkg/config/autodiscover/csv_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package autodiscover

import (
"encoding/json"
"fmt"

log "github.com/sirupsen/logrus"
Expand Down Expand Up @@ -80,7 +79,7 @@ func GetCSVsByLabel(labelName, labelValue, namespace string) (*CSVList, error) {
log.Debug("Command: ", out)

var csvList CSVList
err = json.Unmarshal([]byte(out), &csvList)
err = jsonUnmarshal([]byte(out), &csvList)
if err != nil {
return nil, err
}
Expand Down
3 changes: 1 addition & 2 deletions pkg/config/autodiscover/pod_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package autodiscover

import (
"encoding/json"
"fmt"

log "github.com/sirupsen/logrus"
Expand Down Expand Up @@ -163,7 +162,7 @@ func GetPodsByLabel(label configsections.Label, namespace string) (*PodList, err
log.Debug("Command: ", out)

var podList PodList
err = json.Unmarshal([]byte(out), &podList)
err = jsonUnmarshal([]byte(out), &podList)
if err != nil {
return nil, err
}
Expand Down