code: func qParamSplit(v string) (mediaType string, qValue string, acceptParams string) {
  	rest := v
  	for {
  		semicolon := strings.IndexRune(rest, ';')
  		if semicolon < 0 {
  			mediaType = v
  			return
  		}
  		semicolonAbs := len(v) - len(rest) + semicolon // mark
  		rest = rest[semicolon:]
  
  		rest = rest[1:] // consume ;
  		rest = strings.TrimLeftFunc(rest, unicode.IsSpace)
  		if rest == "" || (rest[0] != 'q' && rest[0] != 'Q') {
  			continue
  		}
  
  		rest = rest[1:] // consume q
  		rest = strings.TrimLeftFunc(rest, unicode.IsSpace)
  		if rest == "" || rest[0] != '=' {
  			continue
  		}
  
  		rest = rest[1:] // consume =
  		rest = strings.TrimLeftFunc(rest, unicode.IsSpace)
  		if rest == "" {
  			continue
  		}
  
  		qValueStartAbs := len(v) - len(rest) // mark
  		semicolon2 := strings.IndexRune(rest, ';')
  		if semicolon2 >= 0 {
  			semicolon2Abs := len(v) - len(rest) + semicolon2
  			mediaType = v[:semicolonAbs]
  			qValue = v[qValueStartAbs:semicolon2Abs]
  			acceptParams = v[semicolon2Abs+1:]
  			acceptParams = strings.TrimLeftFunc(acceptParams, unicode.IsSpace)
  		} else {
  			mediaType = v[:semicolonAbs]
  			qValue = v[qValueStartAbs:]
  		}
  		qValue = strings.TrimRightFunc(qValue, unicode.IsSpace)
  		return
  	}
  }
docs: // qParamSplit splits media type and accept params by "q" parameter.