Skip to content

Instantly share code, notes, and snippets.

@utkarshmani1997
Created October 31, 2017 11:53
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/fd6ed6f36c912c6df23623a49414b421 to your computer and use it in GitHub Desktop.
Save utkarshmani1997/fd6ed6f36c912c6df23623a49414b421 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