Home | History | Annotate | Download | only in wiki
      1 package main
      2 
      3 import (
      4 	"fmt"
      5 	"net/http"
      6 )
      7 
      8 func handler(w http.ResponseWriter, r *http.Request) {
      9 	fmt.Fprintf(w, "Hi there, I love %s!", r.URL.Path[1:])
     10 }
     11 
     12 func main() {
     13 	http.HandleFunc("/", handler)
     14 	http.ListenAndServe(":8080", nil)
     15 }
     16