From 8cdd6f4cc7be9c4f7f0679f9d0da91c3821a6ba2 Mon Sep 17 00:00:00 2001 From: Charlie Tonneslan Date: Sat, 21 Mar 2026 13:01:30 -0400 Subject: [PATCH] Replace deprecated io/ioutil with io in whipservice (#4375) ioutil.ReadAll has been deprecated since Go 1.16 in favor of io.ReadAll. This was the last remaining io/ioutil usage in the codebase. --- pkg/service/whipservice.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/service/whipservice.go b/pkg/service/whipservice.go index a919ac341..244bcc85e 100644 --- a/pkg/service/whipservice.go +++ b/pkg/service/whipservice.go @@ -18,7 +18,7 @@ import ( "encoding/json" "errors" "fmt" - "io/ioutil" + "io" "net/http" "net/url" "strings" @@ -156,7 +156,7 @@ func (s *WHIPService) validateCreate(r *http.Request) (*createRequest, int, erro fromIngress := r.Header.Get("X-Livekit-Ingress") - offerSDPBytes, err := ioutil.ReadAll(r.Body) + offerSDPBytes, err := io.ReadAll(r.Body) if err != nil { return nil, http.StatusBadRequest, fmt.Errorf("body does not have SDP offer: %s", err) } @@ -462,7 +462,7 @@ func (s *WHIPService) handleParticipantPatch(w http.ResponseWriter, r *http.Requ return } - sdpFragmentBytes, err := ioutil.ReadAll(r.Body) + sdpFragmentBytes, err := io.ReadAll(r.Body) if err != nil { s.handleError("Patch", w, r, http.StatusBadRequest, fmt.Errorf("body does not have SDP fragment: %s", err)) return