all: replace deprecated ioutil references

This PR removes calls to ioutil library and replaces them
with their new locations in the io and os packages.

Fixes #9034
Updates #5210

Signed-off-by: Marwan Sulaiman <marwan@tailscale.com>
This commit is contained in:
Marwan Sulaiman
2023-08-23 16:42:44 +01:00
committed by Marwan Sulaiman
parent 1b8a538953
commit 9c07f4f512
5 changed files with 7 additions and 12 deletions

View File

@@ -15,7 +15,6 @@ import (
"errors"
"fmt"
"io"
"io/ioutil"
"net"
"net/http"
"net/http/httptest"
@@ -562,7 +561,7 @@ func TestSSHRecordingNonInteractive(t *testing.T) {
recordingServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
defer cancel()
var err error
recording, err = ioutil.ReadAll(r.Body)
recording, err = io.ReadAll(r.Body)
if err != nil {
t.Error(err)
return