Merge pull request 'Better import packaging' (#7) from better_packaging into main

Reviewed-on: http://192.168.178.135:3000/Fabelous/Go_server_w_argos_translate/pulls/7
This commit is contained in:
Falko Victor Habel 2024-03-14 07:23:08 +00:00
commit f89fbd2ce6
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