sw_vers -productVersion returns version string with trailing line break.
It's OK if you using macOS 10.12.6 because this package needs 2nd elements of slice.
However there is pitfall when you are using High Sierra because version string is 10.13\n and strconv.Atoi() can't convert 13\n to 13
sw_vers -productVersion
returns version string with trailing line break.It's OK if you using macOS 10.12.6 because this package needs 2nd elements of slice. However there is pitfall when you are using High Sierra because version string is
10.13\n
and strconv.Atoi() can't convert13\n
to13
So I added a trimming.
Thank you.