MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / SetOf

Function SetOf

channels/set.go:84–93  ·  view source on GitHub ↗

SetOf creates a new Set. Returns an error if any names are invalid.

(chans ...ID)

Source from the content-addressed store, hash-verified

82
83// SetOf creates a new Set. Returns an error if any names are invalid.
84func SetOf(chans ...ID) (Set, error) {
85 result := make(Set, len(chans))
86 for _, ch := range chans {
87 if !IsValidChannel(ch.Name) {
88 return nil, illegalChannelError(ch.Name)
89 }
90 result[ch] = present{}
91 }
92 return result, nil
93}
94
95// If the set contains "*", returns a set of only "*". Else returns the original set.
96func ExpandingStar(set base.Set) base.Set {

Callers 1

startChangesFunction · 0.92

Calls 2

IsValidChannelFunction · 0.85
illegalChannelErrorFunction · 0.85

Tested by

no test coverage detected