modelRT/util/map.go

12 lines
296 B
Go
Raw Normal View History

// Package util provide some utility functions
package util
// GetKeysFromSet define func to get all keys from a map[string]struct{}
func GetKeysFromSet(set map[string]struct{}) []string {
keys := make([]string, 0, len(set))
for key := range set {
keys = append(keys, key)
}
return keys
}