Skip to content

Commit bd74184

Browse files
authored
Update golang.md
1 parent e6b0aad commit bd74184

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

content/plugins/tutorials/golang.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,24 @@ Create a Go program that makes an http request using the Yaml configuration para
3030
package main
3131

3232
import (
33-
"net/http"
34-
"os"
33+
"net/http"
34+
"os"
35+
"strings"
3536
)
3637

3738
func main() {
38-
body := strings.NewReader(
39-
os.GetEnv("PLUGIN_BODY"),
40-
)
41-
42-
req, err := http.NewRequest(
43-
os.GetEnv("PLUGIN_METHOD"),
44-
os.GetEnv("PLUGIN_URL"),
45-
body,
46-
)
47-
if err != nil {
48-
os.Exit(1)
49-
}
39+
body := strings.NewReader(
40+
os.Getenv("PLUGIN_BODY"),
41+
)
42+
43+
_, err := http.NewRequest(
44+
os.Getenv("PLUGIN_METHOD"),
45+
os.Getenv("PLUGIN_URL"),
46+
body,
47+
)
48+
if err != nil {
49+
os.Exit(1)
50+
}
5051
}
5152
```
5253

0 commit comments

Comments
 (0)