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:
commit
f89fbd2ce6
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue