Wednesday, January 1, 2020

Started learning go language.

package : net.http


sample code :

package main

import (
"fmt"
"net/http"
)

type adi string

func (a adi) ServeHTTP(res http.ResponseWriter, req *http.Request) {
fmt.Fprintln(res, "hiSDLKJSDF")
}

func main() {
var i adi
http.ListenAndServe(":8080", i)

}