1
0
mirror of https://github.com/rancher/steve.git synced 2025-09-01 07:27:46 +00:00

Cleanup counts

This commit is contained in:
Darren Shepherd
2019-08-16 11:40:42 -07:00
parent b059dcca00
commit 5142b5c386
4 changed files with 64 additions and 5 deletions

View File

@@ -133,3 +133,25 @@ func SetColumns(s *types.Schema, columns interface{}) {
func Columns(s *types.Schema) interface{} {
return s.Attributes["columns"]
}
func PreferredVersion(s *types.Schema) string {
return convert.ToString(s.Attributes["preferredVersion"])
}
func SetPreferredVersion(s *types.Schema, ver string) {
if s.Attributes == nil {
s.Attributes = map[string]interface{}{}
}
s.Attributes["preferredVersion"] = ver
}
func PreferredGroup(s *types.Schema) string {
return convert.ToString(s.Attributes["preferredGroup"])
}
func SetPreferredGroup(s *types.Schema, ver string) {
if s.Attributes == nil {
s.Attributes = map[string]interface{}{}
}
s.Attributes["preferredGroup"] = ver
}