12 lines
296 B
Go
12 lines
296 B
Go
|
|
// 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
|
||
|
|
}
|