Better import packaging

This commit is contained in:
Falko Victor Habel 2024-03-14 08:05:44 +01:00
parent f4558e0013
commit 2ebb16b1bd
1 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"io"
"log"
"net/http"
"os"
@ -35,7 +35,7 @@ func getAllPackages() {
}
func handleRequest(w http.ResponseWriter, r *http.Request) {
// Read the request body
body, err := ioutil.ReadAll(r.Body)
body, err := io.ReadAll(r.Body)
if err != nil {
http.Error(w, "Error reading request body: "+err.Error(), http.StatusInternalServerError)
return