code: func manifestDispatcher(ctx *Context, r *http.Request) http.Handler {
  	manifestHandler := &manifestHandler{
  		Context: ctx,
  	}
  	reference := getReference(ctx)
  	dgst, err := digest.Parse(reference)
  	if err != nil {
  		// We just have a tag
  		manifestHandler.Tag = reference
  	} else {
  		manifestHandler.Digest = dgst
  	}
  
  	mhandler := handlers.MethodHandler{
  		"GET":  http.HandlerFunc(manifestHandler.GetManifest),
  		"HEAD": http.HandlerFunc(manifestHandler.GetManifest),
  	}
  
  	if !ctx.readOnly {
  		mhandler["PUT"] = http.HandlerFunc(manifestHandler.PutManifest)
  		mhandler["DELETE"] = http.HandlerFunc(manifestHandler.DeleteManifest)
  	}
  
  	return mhandler
  }
docs: // manifestDispatcher takes the request context and builds the
  // appropriate handler for handling manifest requests.