Skip to content

Commit 737d496

Browse files
sevicosuzp1984
authored andcommitted
Proxy: Replace deprecated io/ioutil with io package
The io/ioutil package has been deprecated since Go 1.16. Replace all usages with their io package equivalents: - ioutil.ReadAll -> io.ReadAll - ioutil.Discard -> io.Discard Files changed: - internal/utils/utils.go - internal/logger/log.go - internal/protocol/rtc.go - internal/protocol/http.go
1 parent 913b773 commit 737d496

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

internal/proxy/rtc.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99
"encoding/json"
1010
"fmt"
1111
"io"
12-
"io/ioutil"
1312
"net"
1413
"net/http"
1514
"strconv"
@@ -224,7 +223,7 @@ func (v *webRTCProxyServer) proxyApiToBackend(
224223
}
225224

226225
// Parse the local SDP answer from backend.
227-
b, err := ioutil.ReadAll(resp.Body)
226+
b, err := io.ReadAll(resp.Body)
228227
if err != nil {
229228
return errors.Wrapf(err, "read stream from %v", backendURL)
230229
}

0 commit comments

Comments
 (0)