code: func (c *Context) NegotiateFormat(offered ...string) string {
  	assert1(len(offered) > 0, "you must provide at least one offer")
  
  	if c.Accepted == nil {
  		c.Accepted = parseAccept(c.requestHeader("Accept"))
  	}
  	if len(c.Accepted) == 0 {
  		return offered[0]
  	}
  	for _, accepted := range c.Accepted {
  		for _, offert := range offered {
  			// According to RFC 2616 and RFC 2396, non-ASCII characters are not allowed in headers,
  			// therefore we can just iterate over the string without casting it into []rune
  			i := 0
  			for ; i < len(accepted); i++ {
  				if accepted[i] == '*' || offert[i] == '*' {
  					return offert
  				}
  				if accepted[i] != offert[i] {
  					break
  				}
  			}
  			if i == len(accepted) {
  				return offert
  			}
  		}
  	}
  	return ""
  }
docs: // NegotiateFormat returns an acceptable Accept format.