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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
16 additions and
0 deletions
-
templates/front/snippets/go.html
-
templates/front/snippets/go.txt
-
templates/front/welcome.html
|
|
@ -0,0 +1,4 @@ |
|
|
|
<div class="highlight"><pre><span></span><span class="nb">import</span> <span class="s1">"net/http"</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> |
|
|
@ -0,0 +1,9 @@ |
|
|
|
import "fmt" |
|
|
|
import "net/http" |
|
|
|
|
|
|
|
func main() { |
|
|
|
_, err := http.Head("PING_URL") |
|
|
|
if err != nil { |
|
|
|
fmt.Printf("%s", err) |
|
|
|
} |
|
|
|
} |
|
|
@ -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> |
|
|
|