additional commenting

This commit is contained in:
Baipyrus 2024-04-12 10:05:14 +02:00
parent 90f577820e
commit e436850d7b

View File

@ -116,16 +116,19 @@ func LoadMatrixData() (string, int, int) {
}
func SendRequest(client *resty.Client, url string, ins []interface{}) {
// Build and send request
resp, err := client.R().
SetHeader("Content-Type", "application/json").
SetBody(ins).
Post(fmt.Sprintf("%s/instructions", url))
// Error handling
if err != nil {
log.Fatal(err)
return
}
// Print response status
log.Printf("Response Status: %s\n", resp.Status())
}