- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for walkMatch (0.25 sec)
-
tests/fuzz/regression_test.go
t.Run(c.Name(), func(t *testing.T) { by, err := os.ReadFile(filepath.Join(dir, c.Name())) if err != nil { t.Fatal(err) } runfuzz(t, c.Name(), by) }) } } func walkMatch(root string, pattern *regexp.Regexp) ([]string, error) { var matches []string err := filepath.Walk(root, func(path string, info os.FileInfo, err error) error { if err != nil { return err }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Feb 10 16:43:09 UTC 2023 - 5.9K bytes - Viewed (0) -
pkg/util/iptree/iptree_test.go
} // match exact prefix path := []string{} r.WalkPath(netip.MustParsePrefix("10.1.1.32/26"), func(k netip.Prefix, v int) bool { path = append(path, k.String()) return false }) if !cmp.Equal(path, keys[:4]) { t.Errorf("Walkpath expected %v got %v", keys[:4], path) } // not match on prefix path = []string{} r.WalkPath(netip.MustParsePrefix("10.1.1.33/26"), func(k netip.Prefix, v int) bool {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Oct 31 21:05:04 UTC 2023 - 17.8K bytes - Viewed (0) -
pilot/pkg/config/monitor/monitor.go
func (m recursiveWatcher) watchRecursive(path string) error { err := filepath.Walk(path, func(walkPath string, fi os.FileInfo, err error) error { if err != nil { return err } if fi.IsDir() { if err = m.Watcher.Add(walkPath); err != nil { return err } } return nil }) return err }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Feb 12 17:36:33 UTC 2024 - 7.2K bytes - Viewed (0) -
pkg/util/iptree/iptree.go
bitPosition = n.prefix.Bits() } recursiveWalk[T](n, fn) } // WalkPath is used to walk the tree, but only visiting nodes // from the root down to a given IP prefix. Where WalkPrefix walks // all the entries *under* the given prefix, this walks the // entries *above* the given prefix. func (t *Tree[T]) WalkPath(path netip.Prefix, fn WalkFn[T]) { n := t.rootV4 if path.Addr().Is6() { n = t.rootV6 }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Oct 31 21:05:04 UTC 2023 - 17.7K bytes - Viewed (0) -
pkg/controller/servicecidrs/servicecidrs_controller.go
defer c.muTree.Unlock() serviceCIDRs := sets.New[string]() for _, cidr := range serviceCIDR.Spec.CIDRs { if prefix, err := netip.ParsePrefix(cidr); err == nil { // if is empty err will not be nil c.tree.WalkPath(prefix, func(k netip.Prefix, v sets.Set[string]) bool { serviceCIDRs.Insert(v.UnsortedList()...) return false }) c.tree.WalkPrefix(prefix, func(k netip.Prefix, v sets.Set[string]) bool {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat May 04 18:33:12 UTC 2024 - 18K bytes - Viewed (0)