From e436850d7b7e4dc9b82e04858653b202e4062121 Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Fri, 12 Apr 2024 10:05:14 +0200 Subject: [PATCH] additional commenting --- main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.go b/main.go index 4b90580..b2ca908 100644 --- a/main.go +++ b/main.go @@ -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()) }