// cvssVersionToMethod accepts a CVSS version as string (e.g. "3.1") and converts it to a
// CycloneDx rating Method, for example "CVSSv3"
cvssVersionToMethod accepts a CVSS version as string  and converts it to a
CycloneDx rating Method, for example "CVSSv3"
// cvssVersionToMethod accepts a CVSS version as string ( e . g . " 3 . 1 " ) and converts it to a // CycloneDx rating Method for example " CVSSv3 "
func cvssVersionToMethod(version string) (string, error) {
	value, err := strconv.ParseFloat(version, 64)
	if err != nil {
		return "", err
	}
	switch int(value) {
	case 2:
		return "CVSSv2", nil
	case 3:
		return "CVSSv3", nil
	default:
		return "", fmt.Errorf("unable to parse %s into a CVSS version", version)
	}
}
func cvssVersionToMethod ( version string ) ( string , error ) { value , err := strconv . ParseFloat ( version , 64 ) if err != nil { return " " , err } switch int ( value ) { case 2 : return " " , nil case 3 : return " " , nil default : return " " , fmt . Errorf ( " " , version ) } }
cvssVersionToMethod accepts a CVSS version as string  and converts it to a
CycloneDx rating Method, for example "CVSSv3"
cvssVersionToMethod accepts a CVSS version as string and converts it to a CycloneDx rating Method for example " CVSSv3 "