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

Method AsSet

channels/timed_set.go:83–92  ·  view source on GitHub ↗

Converts a TimedSet to a Set

()

Source from the content-addressed store, hash-verified

81
82// Converts a TimedSet to a Set
83func (set TimedSet) AsSet() base.Set {
84 if set == nil {
85 return nil
86 }
87 result := make([]string, 0, len(set))
88 for ch := range set {
89 result = append(result, ch)
90 }
91 return base.SetFromArray(result)
92}
93
94func (set TimedSet) Validate() error {
95 for name := range set {

Callers 6

TestJWTRolesChannelsFunction · 0.80
marshalPrincipalFunction · 0.80
handleAllDocsMethod · 0.80
GetPrincipalForTestMethod · 0.80

Calls 1

SetFromArrayFunction · 0.92

Tested by 1

TestJWTRolesChannelsFunction · 0.64