Move from deprecated ioutil to os and io packages
This commit is contained in:
parent
46c1600ada
commit
8d739c411b
4 changed files with 15 additions and 15 deletions
|
@ -2,7 +2,7 @@ package tcpipwhitelist
|
|||
|
||||
import (
|
||||
"context"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"net"
|
||||
"testing"
|
||||
|
||||
|
@ -103,7 +103,7 @@ func TestIPWhiteLister_ServeHTTP(t *testing.T) {
|
|||
whiteLister.ServeTCP(&contextWriteCloser{client, addr{test.remoteAddr}})
|
||||
}()
|
||||
|
||||
read, err := ioutil.ReadAll(server)
|
||||
read, err := io.ReadAll(server)
|
||||
require.NoError(t, err)
|
||||
|
||||
assert.Equal(t, test.expected, string(read))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue