Skip to content

Commit

Permalink
Fix deprecated ReadAll call
Browse files Browse the repository at this point in the history
Fix deprecation warning by switching to `io` package.

Signed-off-by: Matthias Diester <[email protected]>
  • Loading branch information
HeavyWombat committed Sep 8, 2022
1 parent 4f15f2d commit 3934609
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions helloworld/helloworld.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ package main
import (
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
"os/exec"
Expand Down Expand Up @@ -91,7 +90,7 @@ func HandleHTTP(w http.ResponseWriter, r *http.Request) {

// If there's a body then read it in for later use
if r.Body != nil {
body, _ = ioutil.ReadAll(r.Body)
body, _ = io.ReadAll(r.Body)
}

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

0 comments on commit 3934609

Please sign in to comment.