github.com/EngineerKamesh/gofullstack@v0.0.0-20180609171605-d41341d7d4ee/volume3/section5/gopherface/handlers/foo.go (about)

     1  package handlers
     2  
     3  import (
     4  	"net/http"
     5  )
     6  
     7  func FooHandler(w http.ResponseWriter, r *http.Request) {
     8  
     9  	fooID := r.Context().Value("fooID").(string)
    10  	w.Write([]byte(fooID))
    11  
    12  }