MCPcopy
hub / github.com/syncthing/syncthing / Each

Method Each

lib/model/service_map.go:123–130  ·  view source on GitHub ↗

Each calls the given function for each service in the map. An error from fn will stop the iteration and be returned as-is.

(fn func(K, S) error)

Source from the content-addressed store, hash-verified

121// Each calls the given function for each service in the map. An error from
122// fn will stop the iteration and be returned as-is.
123func (s *serviceMap[K, S]) Each(fn func(K, S) error) error {
124 for key, svc := range s.services {
125 if err := fn(key, svc); err != nil {
126 return err
127 }
128 }
129 return nil
130}
131
132// Suture implementation
133

Callers 6

removeFolderMethod · 0.80
restartFolderMethod · 0.80
newFolderMethod · 0.80
FolderStatisticsMethod · 0.80
RemoveAllExceptMethod · 0.80
TestServiceMapFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestServiceMapFunction · 0.64