encoding/encoder.go
func (e *Encoder) Responder(r *http.Request) Responder {
	accept := r.Header.Get("Accept")
	infoList := parseAcceptHeader(accept)

	for _, info := range infoList {
		for encoding, i := range e.encodings {
			if i.equals(info) {
				return encoding
			}
		}
	}

	return e.Parser(r).(Responder)
}
func (e *Encoder) Responder(r *http.Request) Responder {
	accept := r.Header.Get("Accept")
	infoList := parseAcceptHeader(accept)

	for _, info := range infoList {
		for encoding, i := range e.encodings {
			if i.equals(info) {
				return encoding
			}
		}
	}

	return e.Parser(r).(Responder)
}
func ( e * Encoder ) Responder ( r * http . Request ) Responder { accept := r . Header . Get ( " " ) infoList := parseAcceptHeader ( accept ) for _ , info := range infoList { for encoding , i := range e . encodings { if i . equals ( info ) { return encoding } } } return e . Parser ( r ) . ( Responder ) }
// Responder returns a responder based on the mime, if none can be matched the
// default is returned
Responder returns a responder based on the mime if none can be matched the default is returned