Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
yihuang committed Sep 23, 2022
1 parent 11f6639 commit 430fa95
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions store/streaming/file/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package file
import (
"errors"
"fmt"
"io/ioutil"
"os"
"path"
"path/filepath"
Expand Down Expand Up @@ -272,7 +271,7 @@ func (fss *StreamingService) Close() error {
// to dir. It returns nil if dir is writable.
func isDirWriteable(dir string) error {
f := path.Join(dir, ".touch")
if err := ioutil.WriteFile(f, []byte(""), 0600); err != nil {
if err := os.WriteFile(f, []byte(""), 0600); err != nil {
return err
}
return os.Remove(f)
Expand Down
3 changes: 1 addition & 2 deletions store/streaming/file/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package file
import (
"encoding/binary"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"sync"
Expand Down Expand Up @@ -369,7 +368,7 @@ func testListenEndBlock(t *testing.T) {

func readInFile(name string) ([]byte, error) {
path := filepath.Join(testDir, name)
return ioutil.ReadFile(path)
return os.ReadFile(path)
}

// Returns all of the protobuf messages contained in the byte array as an array of byte arrays
Expand Down

0 comments on commit 430fa95

Please sign in to comment.