Golang sever tutorial #1

Golang sever tutorial #1

A simple server in golang.

<div>
<div>package main</div>
<div>import (</div>
<div>    "fmt"</div>
<div>    "net/http"</div>
<div>)</div>
<div>func main() {</div>
<div></div>
<div>    http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {</div>
<div>        fmt.Fprintf(w, "Here is my golang server....")</div>
<div>    })</div>
<div>    http.ListenAndServe(":8080", nil)</div>
<div>}</div>
</div>
Tony BB
 

TonyBB is a Coach , marketer, hypnotist and a founder of RSKVF Production who specializes in providing simple, affordable, and easy to use solutions for Life.

Click Here to Leave a Comment Below 0 comments

Leave a Reply: