Remove trailing \n

This commit is contained in:
yo 2022-07-10 14:14:32 +02:00
parent d3410c281a
commit 1295fb86f6

View File

@ -199,7 +199,7 @@ func getFreeBSDVersion() (FreeBSDVersion, error) {
if err != nil {
return version, err
}
version.flavor = re.FindStringSubmatch(out)[4]
version.flavor = strings.Trim(re.FindStringSubmatch(out)[4], "\n")
// Skip the 'p' starting patch level
if len(re.FindStringSubmatch(out)[6]) > 0 {