Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions content/plugins/tutorials/golang.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,24 @@ Create a Go program that makes an http request using the Yaml configuration para
package main

import (
"net/http"
"os"
"net/http"
"os"
"strings"
)

func main() {
body := strings.NewReader(
os.GetEnv("PLUGIN_BODY"),
)

req, err := http.NewRequest(
os.GetEnv("PLUGIN_METHOD"),
os.GetEnv("PLUGIN_URL"),
body,
)
if err != nil {
os.Exit(1)
}
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)
}
}
```

Expand Down