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
5 changes: 2 additions & 3 deletions pget_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"encoding/hex"
"fmt"
"io"
"io/ioutil"
"net/http"
"net/http/httptest"
"os"
Expand All @@ -19,7 +18,7 @@ import (
)

func TestMain(m *testing.M) {
stdout = ioutil.Discard
stdout = io.Discard
os.Exit(m.Run())
}

Expand All @@ -40,7 +39,7 @@ func TestPget(t *testing.T) {

mux.HandleFunc("/test.tar.gz", func(w http.ResponseWriter, r *http.Request) {
fp := "_testdata/test.tar.gz"
data, err := ioutil.ReadFile(fp)
data, err := os.ReadFile(fp)
if err != nil {
t.Errorf("failed to readfile: %s", err)
}
Expand Down
3 changes: 1 addition & 2 deletions run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"context"
"fmt"
"io"
"io/ioutil"
"net/http"
"net/http/httptest"
"os"
Expand All @@ -22,7 +21,7 @@ func TestRunResume(t *testing.T) {

mux.HandleFunc("/file.name", func(w http.ResponseWriter, r *http.Request) {
fp := filepath.Join("_testdata", "test.tar.gz")
data, err := ioutil.ReadFile(fp)
data, err := os.ReadFile(fp)
if err != nil {
t.Errorf("failed to readfile: %s", err)
}
Expand Down