code: func ParseVersion(version string) (int, int, int, error) {
  	var major, minor, micro int
  	if version == "" {
  		return -1, -1, -1, fmt.Errorf("invalid version %q: the version is empty", version)
  	}
  
  	parts := strings.Split(version, ".")
  	if len(parts) >= 4 {
  		return -1, -1, -1, fmt.Errorf("invalid version %q: too many parts", version)
  	}
  
  	major, err := strconv.Atoi(parts[0])
  	if err != nil {
  		return -1, -1, -1, fmt.Errorf("failed to convert major version part %q: %v", parts[0], err)
  	}
  
  	if len(parts) >= 2 {
  		minor, err = strconv.Atoi(parts[1])
  		if err != nil {
  			return -1, -1, -1, fmt.Errorf("failed to convert minor version part %q: %v", parts[1], err)
  		}
  	}
  
  	if len(parts) >= 3 {
  		micro, err = strconv.Atoi(parts[2])
  		if err != nil {
  			return -1, -1, -1, fmt.Errorf("failed to convert micro version part %q: %v", parts[2], err)
  		}
  	}
  
  	return major, minor, micro, nil
  }
docs: // ParseVersion parses a version string like "3.0.1" or "0.4.5" into major,
  // minor, and micro numbers or returns an error