(group *Group)
| 27 | } |
| 28 | |
| 29 | func (c *Cache) addEmpty(group *Group) (added, removed []Config) { |
| 30 | set, ok := c.sources[group.Source] |
| 31 | if !ok { |
| 32 | return nil, nil |
| 33 | } |
| 34 | |
| 35 | for hash, cfg := range set { |
| 36 | c.hashes[hash]-- |
| 37 | if c.hashes[hash] == 0 { |
| 38 | removed = append(removed, cfg) |
| 39 | } |
| 40 | delete(set, hash) |
| 41 | } |
| 42 | |
| 43 | delete(c.sources, group.Source) |
| 44 | |
| 45 | return nil, removed |
| 46 | } |
| 47 | |
| 48 | func (c *Cache) addNotEmpty(group *Group) (added, removed []Config) { |
| 49 | set, ok := c.sources[group.Source] |