code: func ServeFormatted(w http.ResponseWriter, r *http.Request, v interface{}) {
  	accept := r.Header.Get("Accept")
  	switch accept {
  	case applicationJson:
  		ServeJson(w, v)
  	case applicationXml, textXml:
  		ServeXml(w, v)
  	default:
  		ServeJson(w, v)
  	}
  
  	return
  }
docs: // ServeFormatted replies to the request with
  // a formatted representation of resource v, in the
  // format requested by the client specified in the
  // Accept header.