code: func DefaultResponder(w http.ResponseWriter, r *http.Request, v interface{}) {
  	if v != nil {
  		switch reflect.TypeOf(v).Kind() {
  		case reflect.Chan:
  			switch GetAcceptedContentType(r) {
  			case ContentTypeEventStream:
  				channelEventStream(w, r, v)
  				return
  			default:
  				v = channelIntoSlice(w, r, v)
  			}
  		}
  	}
  
  	// Format response based on request Accept header.
  	switch GetAcceptedContentType(r) {
  	case ContentTypeJSON:
  		JSON(w, r, v)
  	case ContentTypeXML:
  		XML(w, r, v)
  	default:
  		JSON(w, r, v)
  	}
  }
docs: // Respond handles streaming JSON and XML responses, automatically setting the
  // Content-Type based on request headers. It will default to a JSON response.