set/set.go
func (s *Set) ItemsFunc(f func(value interface{}) bool) []interface{} {
	s.RLock()
	defer s.RUnlock()
	items := []interface{}{}
	for k := range s.m {
		if f(k) {
			items = append(items, k)
		}
	}
	return items
}
func (s *Set) ItemsFunc(f func(value interface{}) bool) []interface{} {
	s.RLock()
	defer s.RUnlock()
	items := []interface{}{}
	for k := range s.m {
		if f(k) {
			items = append(items, k)
		}
	}
	return items
}
func ( s * Set ) ItemsFunc ( f func ( value interface { } ) bool ) [ ] interface { } { s . RLock ( ) defer s . RUnlock ( ) items := [ ] interface { } { } for k := range s . m { if f ( k ) { items = append ( items , k ) } } return items }
// ItemsFunc returns slice of all items that when passed to f, f returns true.
// Modification to the returned slice does not affect the structure of
// the set. However, any item in the set that is a pointer will be affected
// if modified.
ItemsFunc returns slice of all items that when passed to f f returns true . Modification to the returned slice does not affect the structure of the set . However any item in the set that is a pointer will be affected if modified .