code: func (t Types) GetByType(tp string) (Type, bool) {
  	for _, tt := range t {
  		if strings.EqualFold(tt.Type(), tp) {
  			return tt, true
  		}
  	}
  
  	if !strings.Contains(tp, "+") {
  		// Try with the main and sub type
  		parts := strings.Split(tp, "/")
  		if len(parts) == 2 {
  			return t.GetByMainSubType(parts[0], parts[1])
  		}
  	}
  
  	return Type{}, false
  }
docs: // GetByType returns a media type for tp.