diff --git a/templates/docs/go.html b/templates/docs/go.html new file mode 100644 index 00000000..39da92c8 --- /dev/null +++ b/templates/docs/go.html @@ -0,0 +1,19 @@ +

Go

+

Below is an example of making a HTTP request to SITE_NAME from Go.

+
package main
+
+import "fmt"
+import "net/http"
+import "time"
+
+func main() {
+    var client = &http.Client{
+        Timeout: 10 * time.Second,
+    }
+
+    _, err := client.Head("PING_URL")
+    if err != nil {
+        fmt.Printf("%s", err)
+    }
+}
+
\ No newline at end of file diff --git a/templates/docs/go.md b/templates/docs/go.md new file mode 100644 index 00000000..1c04a10d --- /dev/null +++ b/templates/docs/go.md @@ -0,0 +1,23 @@ +# Go + +Below is an example of making a HTTP request to SITE_NAME from Go. + +```go +package main + +import "fmt" +import "net/http" +import "time" + +func main() { + var client = &http.Client{ + Timeout: 10 * time.Second, + } + + _, err := client.Head("PING_URL") + if err != nil { + fmt.Printf("%s", err) + } +} + +``` diff --git a/templates/front/base_docs.html b/templates/front/base_docs.html index 72391949..95371fe6 100644 --- a/templates/front/base_docs.html +++ b/templates/front/base_docs.html @@ -25,6 +25,7 @@ {% include "front/docs_nav_item.html" with slug="python" title="Python" %} {% include "front/docs_nav_item.html" with slug="ruby" title="Ruby" %} {% include "front/docs_nav_item.html" with slug="php" title="PHP" %} + {% include "front/docs_nav_item.html" with slug="go" title="Go" %} {% include "front/docs_nav_item.html" with slug="csharp" title="C#" %} {% include "front/docs_nav_item.html" with slug="javascript" title="Javascript" %} {% include "front/docs_nav_item.html" with slug="powershell" title="PowerShell" %}