We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e6b0aad + bd74184 commit 94c080dCopy full SHA for 94c080d
content/plugins/tutorials/golang.md
@@ -30,23 +30,24 @@ Create a Go program that makes an http request using the Yaml configuration para
30
package main
31
32
import (
33
- "net/http"
34
- "os"
+ "net/http"
+ "os"
35
+ "strings"
36
)
37
38
func main() {
- 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
- }
+ body := strings.NewReader(
+ os.Getenv("PLUGIN_BODY"),
+ )
+
+ _, err := http.NewRequest(
+ os.Getenv("PLUGIN_METHOD"),
+ os.Getenv("PLUGIN_URL"),
+ body,
+ if err != nil {
+ os.Exit(1)
50
+ }
51
}
52
```
53
0 commit comments