code: func validHeaderAcceptJSON(header http.Header) bool {
  	if v, found := header["Accept"]; found {
  		for _, v := range v {
  			if v == "application/json" || v == "*/*" || v == "*/json" || v == "application/*" {
  				return true
  			}
  		}
  		return false
  	}
  	return true
  }
docs: // validHeaderAcceptJSON returns false if one or more Accept
  // headers are present, but none of them are "application/json"
  // (or any matching wildcard). Otherwise returns true.