MCPcopy
hub / github.com/syncthing/syncthing / set

Method set

lib/model/model.go:3368–3375  ·  view source on GitHub ↗

set adds the (dev, folder) pair to the set

(dev protocol.DeviceID, folder string)

Source from the content-addressed store, hash-verified

3366
3367// set adds the (dev, folder) pair to the set
3368func (s folderDeviceSet) set(dev protocol.DeviceID, folder string) {
3369 devs, ok := s[folder]
3370 if !ok {
3371 devs = make(map[protocol.DeviceID]struct{})
3372 s[folder] = devs
3373 }
3374 devs[dev] = struct{}{}
3375}
3376
3377// has returns true if the (dev, folder) pair is in the set
3378func (s folderDeviceSet) has(dev protocol.DeviceID, folder string) bool {

Callers 1

handleIntroductionsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected