Skip to content

Commit

Permalink
Remove ioutil
Browse files Browse the repository at this point in the history
  • Loading branch information
tomwilkie committed Apr 5, 2024
1 parent 13324b1 commit 7b8aafc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lint/model_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"os"
"testing"

"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -56,7 +56,7 @@ func TestParseDatasource(t *testing.T) {
}

func TestParseDashboard(t *testing.T) {
sampleDashboard, err := ioutil.ReadFile("testdata/dashboard.json")
sampleDashboard, err := os.ReadFile("testdata/dashboard.json")
assert.NoError(t, err)
t.Run("Row panels", func(t *testing.T) {
dashboard, err := NewDashboard(sampleDashboard)
Expand Down
4 changes: 2 additions & 2 deletions lint/rules_test.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package lint_test

import (
"io/ioutil"
"os"
"testing"

"github.com/grafana/dashboard-linter/lint"
"github.com/stretchr/testify/assert"
)

func TestCustomRules(t *testing.T) {
sampleDashboard, err := ioutil.ReadFile("testdata/dashboard.json")
sampleDashboard, err := os.ReadFile("testdata/dashboard.json")
assert.NoError(t, err)

for _, tc := range []struct {
Expand Down

0 comments on commit 7b8aafc

Please sign in to comment.