Fix activity list

This commit is contained in:
Dan Sosedoff
2018-06-05 15:48:16 -05:00
parent 77770112bd
commit 56f3b45a4e
2 changed files with 20 additions and 3 deletions

15
pkg/client/util.go Normal file
View File

@@ -0,0 +1,15 @@
package client
import (
"strings"
)
// Get short version from the string
// Example: 10.2.3.1 -> 10.2
func getMajorMinorVersion(str string) string {
chunks := strings.Split(str, ".")
if len(chunks) == 0 {
return str
}
return strings.Join(chunks[0:2], ".")
}