Skip to content

Instantly share code, notes, and snippets.

@utkarshmani1997
Created August 31, 2017 06:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save utkarshmani1997/15547c8e89a824819aca56488c720b2b to your computer and use it in GitHub Desktop.
Save utkarshmani1997/15547c8e89a824819aca56488c720b2b to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"net/http"
)
func handler(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hi there, the end point is : %s !", r.URL.Path[1:])
}
func main() {
http.HandleFunc("/", handler)
http.ListenAndServe(":8080", nil)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment