Skip to content

Commit 3934609

Browse files
committed
Fix deprecated ReadAll call
Fix deprecation warning by switching to `io` package. Signed-off-by: Matthias Diester <[email protected]>
1 parent 4f15f2d commit 3934609

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

helloworld/helloworld.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ package main
1616
import (
1717
"fmt"
1818
"io"
19-
"io/ioutil"
2019
"net/http"
2120
"os"
2221
"os/exec"
@@ -91,7 +90,7 @@ func HandleHTTP(w http.ResponseWriter, r *http.Request) {
9190

9291
// If there's a body then read it in for later use
9392
if r.Body != nil {
94-
body, _ = ioutil.ReadAll(r.Body)
93+
body, _ = io.ReadAll(r.Body)
9594
}
9695

9796
// Turn on debugging if the 'debug' query param is there. Just for

0 commit comments

Comments
 (0)