Browse Source

Merge pull request #293 from omurbekjk/feature/golang-example-added-for-code-snippets

feature: golang code snippet added
pull/307/head
Pēteris Caune 5 years ago
committed by GitHub
parent
commit
ad731dfe0e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 0 deletions
  1. +4
    -0
      templates/front/snippets/go.html
  2. +9
    -0
      templates/front/snippets/go.txt
  3. +3
    -0
      templates/front/welcome.html

+ 4
- 0
templates/front/snippets/go.html View File

@ -0,0 +1,4 @@
<div class="highlight"><pre><span></span><span class="nb">import</span> <span class="s1">&#34;net/http&#34;</span>
<span class="nb">import</span> <span class="s1">"fmt"</span>
<span class="nx">func main() { </span><span class="p">_, err := http.Head("PING_URL") }</span>
</pre></div>

+ 9
- 0
templates/front/snippets/go.txt View File

@ -0,0 +1,9 @@
import "fmt"
import "net/http"
func main() {
_, err := http.Head("PING_URL")
if err != nil {
fmt.Printf("%s", err)
}
}

+ 3
- 0
templates/front/welcome.html View File

@ -62,6 +62,9 @@
<li class="hidden-xs">
<a href="#node" data-toggle="tab">Node.js</a>
</li>
<li class="hidden-xs">
<a href="#go" data-toggle="tab">Go</a>
</li>
<li class="hidden-xs">
<a href="#php" data-toggle="tab">PHP</a>
</li>


Loading…
Cancel
Save