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