summaryrefslogtreecommitdiff
path: root/test/utils/utils.go
diff options
context:
space:
mode:
authorValentin Rothberg <vrothberg@redhat.com>2022-03-21 13:47:59 +0100
committerValentin Rothberg <vrothberg@redhat.com>2022-03-22 13:04:35 +0100
commitf72a678f2a06697ff42e1fe5636cb09b47a25b49 (patch)
tree8f6f5c210d474086f70b826118cd6558ee8fc4e3 /test/utils/utils.go
parentbb6b69b4abe86601a8438a6708263174879b5c51 (diff)
downloadpodman-f72a678f2a06697ff42e1fe5636cb09b47a25b49.tar.gz
podman-f72a678f2a06697ff42e1fe5636cb09b47a25b49.tar.bz2
podman-f72a678f2a06697ff42e1fe5636cb09b47a25b49.zip
linter: enable errchkjson
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
Diffstat (limited to 'test/utils/utils.go')
-rw-r--r--test/utils/utils.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/utils/utils.go b/test/utils/utils.go
index 8fe45dca0..a6295cd19 100644
--- a/test/utils/utils.go
+++ b/test/utils/utils.go
@@ -479,7 +479,10 @@ func IsCommandAvailable(command string) bool {
func WriteJSONFile(data []byte, filePath string) error {
var jsonData map[string]interface{}
json.Unmarshal(data, &jsonData)
- formatJSON, _ := json.MarshalIndent(jsonData, "", " ")
+ formatJSON, err := json.MarshalIndent(jsonData, "", " ")
+ if err != nil {
+ return err
+ }
return ioutil.WriteFile(filePath, formatJSON, 0644)
}