Don't dial dupes

This commit is contained in:
Jae Kwon
2014-07-15 15:54:33 -07:00
parent c9114a677c
commit ac668d4d14
6 changed files with 45 additions and 12 deletions
+10
View File
@@ -52,3 +52,13 @@ func (cm *CMap) Clear() {
defer cm.l.Unlock()
cm.m = make(map[string]interface{}, 0)
}
func (cm *CMap) Values() []interface{} {
cm.l.Lock()
defer cm.l.Unlock()
items := []interface{}{}
for _, v := range cm.m {
items = append(items, v)
}
return items
}