Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9022291

Browse filesBrowse files
authored
Use 'os' instead of 'ioutil' in gazelle tests (#962)
1 parent 4dde147 commit 9022291
Copy full SHA for 9022291

File tree

Expand file treeCollapse file tree

2 files changed

+3
-5
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+3
-5
lines changed

‎gazelle/manifest/manifest_test.go

Copy file name to clipboardExpand all lines: gazelle/manifest/manifest_test.go
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package manifest_test
22

33
import (
44
"bytes"
5-
"io/ioutil"
65
"log"
76
"os"
87
"reflect"
@@ -44,7 +43,7 @@ func TestFile(t *testing.T) {
4443
log.Println(err)
4544
t.FailNow()
4645
}
47-
expected, err := ioutil.ReadFile("testdata/gazelle_python.yaml")
46+
expected, err := os.ReadFile("testdata/gazelle_python.yaml")
4847
if err != nil {
4948
log.Println(err)
5049
t.FailNow()

‎gazelle/python_test.go

Copy file name to clipboardExpand all lines: gazelle/python_test.go
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import (
2424
"context"
2525
"errors"
2626
"fmt"
27-
"io/ioutil"
2827
"os"
2928
"os/exec"
3029
"path/filepath"
@@ -94,9 +93,9 @@ func testPath(t *testing.T, name string, files []bazel.RunfileEntry) {
9493
continue
9594
}
9695

97-
content, err := ioutil.ReadFile(path)
96+
content, err := os.ReadFile(path)
9897
if err != nil {
99-
t.Errorf("ioutil.ReadFile(%q) error: %v", path, err)
98+
t.Errorf("os.ReadFile(%q) error: %v", path, err)
10099
}
101100

102101
if filepath.Base(shortPath) == "test.yaml" {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.