Contains checks if Devices contains devices matching all ids.
(ids ...string)
| 105 | |
| 106 | // Contains checks if Devices contains devices matching all ids. |
| 107 | func (ds Devices) Contains(ids ...string) bool { |
| 108 | for _, id := range ids { |
| 109 | if _, exists := ds[id]; !exists { |
| 110 | return false |
| 111 | } |
| 112 | } |
| 113 | return true |
| 114 | } |
| 115 | |
| 116 | // GetByID returns a reference to the device matching the specified ID (nil otherwise). |
| 117 | func (ds Devices) GetByID(id string) *Device { |
no outgoing calls