func kernelToMajor(getKernelVersion func() (string, error)) (int, error) {
	fullVersion, err := getKernelVersion()
	if err != nil {
		return 0, err
	}
	parts := strings.SplitN(fullVersion, ".", 2)
	majorVersion, err := strconv.ParseInt(parts[0], 10, 32)
	if err != nil {
		return 0, err
	}
	return int(majorVersion), nil
}
// kernelToMajor takes a dotted version and returns just the Major portion
kernelToMajor takes a dotted version and returns just the Major portion
// kernelToMajor takes a dotted version and returns just the Major portion
func kernelToMajor(getKernelVersion func() (string, error)) (int, error) {
	fullVersion, err := getKernelVersion()
	if err != nil {
		return 0, err
	}
	parts := strings.SplitN(fullVersion, ".", 2)
	majorVersion, err := strconv.ParseInt(parts[0], 10, 32)
	if err != nil {
		return 0, err
	}
	return int(majorVersion), nil
}
func kernelToMajor ( getKernelVersion func ( ) ( string , error ) ) ( int , error ) { fullVersion , err := getKernelVersion ( ) if err != nil { return 0 , err } parts := strings . SplitN ( fullVersion , " " , 2 ) majorVersion , err := strconv . ParseInt ( parts [ 0 ] , 10 , 32 ) if err != nil { return 0 , err } return int ( majorVersion ) , nil }
kernelToMajor takes a dotted version and returns just the Major portion
kernelToMajor takes a dotted version and returns just the Major portion