code: func versionParts(v string) ([]int, []interface{}) {
  	if strings.HasPrefix(v, "v") || strings.HasPrefix(v, "V") {
  		// Strip initial 'v' or 'V' prefix if present.
  		v = v[1:]
  	}
  	parts := strings.SplitN(v, "+", 2)
  	parts = strings.SplitN(parts[0], "-", 2)
  	fields := strings.Split(parts[0], ".")
  
  	release := make([]int, len(fields))
  	for i, s := range fields {
  		v, _ := strconv.Atoi(s)
  		release[i] = v
  	}
  
  	var prerelease []interface{}
  	if len(parts) > 1 {
  		fields = strings.Split(parts[1], ".")
  		prerelease = make([]interface{}, len(fields))
  		for i, s := range fields {
  			v, err := strconv.Atoi(s)
  			if err == nil {
  				prerelease[i] = v
  			} else {
  				prerelease[i] = s
  			}
  		}
  	}
  
  	return release, prerelease
  }
docs: // Split a version into parts.
  // "1.2.3-beta.2" -> []int{1, 2, 3}, []interface{}{"beta", 2}