+4
-5
lines changedFilter options
+4
-5
lines changed Original file line number Diff line number Diff line change
@@ -10,7 +10,6 @@ import (
10
10
"crypto/sha256"
11
11
"encoding/hex"
12
12
"fmt"
13
-
"io/ioutil"
14
13
"os"
15
14
"strings"
16
15
)
@@ -52,7 +51,7 @@ func New(key string, ad []byte) (*Standard, error) {
52
51
case "env":
53
52
key = os.Getenv(splitKey[1])
54
53
case "file":
55
-
data, err := ioutil.ReadFile(splitKey[1])
54
+
data, err := os.ReadFile(splitKey[1])
56
55
if err != nil {
57
56
return nil, err
58
57
}
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ package auth
2
2
3
3
import (
4
4
"encoding/json"
5
-
"io/ioutil"
5
+
"os"
6
6
"testing"
7
7
)
8
8
@@ -107,7 +107,7 @@ func TestNullRequest(t *testing.T) {
107
107
108
108
// Sanity check: verify a pre-generated authenticated request.
109
109
func TestPreGenerated(t *testing.T) {
110
-
in, err := ioutil.ReadFile("testdata/authrequest.json")
110
+
in, err := os.ReadFile("testdata/authrequest.json")
111
111
if err != nil {
112
112
t.Fatalf("%v", err)
113
113
}
@@ -126,7 +126,7 @@ func TestPreGenerated(t *testing.T) {
126
126
var bmRequest []byte
127
127
128
128
func TestLoadBenchmarkRequest(t *testing.T) {
129
-
in, err := ioutil.ReadFile("testdata/request.json")
129
+
in, err := os.ReadFile("testdata/request.json")
130
130
if err != nil {
131
131
t.Fatalf("%v", err)
132
132
}
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4