code: func getResourceHandler(scope *RequestScope, getter getterFunc) http.HandlerFunc {
  	return func(w http.ResponseWriter, req *http.Request) {
  		trace := utiltrace.New("Get " + req.URL.Path)
  		defer trace.LogIfLong(500 * time.Millisecond)
  
  		namespace, name, err := scope.Namer.Name(req)
  		if err != nil {
  			scope.err(err, w, req)
  			return
  		}
  		ctx := req.Context()
  		ctx = request.WithNamespace(ctx, namespace)
  
  		outputMediaType, _, err := negotiation.NegotiateOutputMediaType(req, scope.Serializer, scope)
  		if err != nil {
  			scope.err(err, w, req)
  			return
  		}
  
  		result, err := getter(ctx, name, req, trace)
  		if err != nil {
  			scope.err(err, w, req)
  			return
  		}
  
  		trace.Step("About to write a response")
  		transformResponseObject(ctx, scope, trace, req, w, http.StatusOK, outputMediaType, result)
  		trace.Step("Transformed response object")
  	}
  }
docs: // getResourceHandler is an HTTP handler function for get requests. It delegates to the
  // passed-in getterFunc to perform the actual get.