Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace deprecated ioutil package #139

Closed
wants to merge 1 commit into from
Closed
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
3 changes: 1 addition & 2 deletions consopt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import (
"fmt"
"io/ioutil"
"os"
"syscall"
"testing"
Expand Down Expand Up @@ -39,7 +38,7 @@
t.Logf("%v", err)
}

f, err := ioutil.TempFile("", "test")
f, err := os.CreateTemp("", "test")

Check failure on line 41 in consopt_test.go

View workflow job for this annotation

GitHub Actions / test (1.15.x, ubuntu-latest, avx, false)

undefined: os.CreateTemp

Check failure on line 41 in consopt_test.go

View workflow job for this annotation

GitHub Actions / test (1.15.x, ubuntu-latest, sse, false)

undefined: os.CreateTemp

Check failure on line 41 in consopt_test.go

View workflow job for this annotation

GitHub Actions / coverage (avx)

undefined: os.CreateTemp

Check failure on line 41 in consopt_test.go

View workflow job for this annotation

GitHub Actions / coverage (sse)

undefined: os.CreateTemp
if err != nil {
t.Fatal(err)
}
Expand Down
4 changes: 2 additions & 2 deletions dense_io_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import (
"bytes"
"encoding/gob"
"io/ioutil"
"io"
"os"
"os/exec"
"regexp"
Expand Down Expand Up @@ -75,7 +75,7 @@
}

importError := `ImportError: No module named numpy`
slurpErr, _ := ioutil.ReadAll(stderr)
slurpErr, _ := io.ReadAll(stderr)

Check failure on line 78 in dense_io_test.go

View workflow job for this annotation

GitHub Actions / test (1.15.x, ubuntu-latest, avx, false)

undefined: io.ReadAll

Check failure on line 78 in dense_io_test.go

View workflow job for this annotation

GitHub Actions / test (1.15.x, ubuntu-latest, sse, false)

undefined: io.ReadAll

Check failure on line 78 in dense_io_test.go

View workflow job for this annotation

GitHub Actions / coverage (avx)

undefined: io.ReadAll

Check failure on line 78 in dense_io_test.go

View workflow job for this annotation

GitHub Actions / coverage (sse)

undefined: io.ReadAll
if ok, _ := regexp.Match(importError, slurpErr); ok {
t.Skipf("Skipping numpy test. It would appear that you do not have Numpy installed.")
}
Expand Down
3 changes: 1 addition & 2 deletions genlib2/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import (
"io"
"io/ioutil"
"log"
"os"
"os/exec"
Expand Down Expand Up @@ -182,7 +181,7 @@
return err
}
for _, m := range matches {
b, err := ioutil.ReadFile(m)
b, err := os.ReadFile(m)

Check failure on line 184 in genlib2/main.go

View workflow job for this annotation

GitHub Actions / test (1.15.x, ubuntu-latest, avx, false)

undefined: os.ReadFile

Check failure on line 184 in genlib2/main.go

View workflow job for this annotation

GitHub Actions / test (1.15.x, ubuntu-latest, sse, false)

undefined: os.ReadFile

Check failure on line 184 in genlib2/main.go

View workflow job for this annotation

GitHub Actions / coverage (avx)

undefined: os.ReadFile

Check failure on line 184 in genlib2/main.go

View workflow job for this annotation

GitHub Actions / coverage (sse)

undefined: os.ReadFile
if err != nil {
return err
}
Expand Down
Loading