Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 264 for walkFn (0.21 sec)

  1. src/path/filepath/path.go

    		}
    	}
    	return nil
    }
    
    // walk recursively descends path, calling walkFn.
    func walk(path string, info fs.FileInfo, walkFn WalkFunc) error {
    	if !info.IsDir() {
    		return walkFn(path, info, nil)
    	}
    
    	names, err := readDirNames(path)
    	err1 := walkFn(path, info, err)
    	// If err != nil, walk can't walk into this directory.
    	// err1 != nil means walkFn want walk to skip this directory or stop walking.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 15.5K bytes
    - Viewed (0)
  2. src/cmd/go/internal/fsys/fsys.go

    		if err := walk(filename, fi, walkFn); err != nil {
    			if !fi.IsDir() || err != filepath.SkipDir {
    				return err
    			}
    		}
    	}
    	return nil
    }
    
    // Walk walks the file tree rooted at root, calling walkFn for each file or
    // directory in the tree, including root.
    func Walk(root string, walkFn filepath.WalkFunc) error {
    	Trace("Walk", root)
    	info, err := Lstat(root)
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 18:35:34 UTC 2024
    - 22.7K bytes
    - Viewed (0)
  3. pkg/util/iptree/iptree.go

    		count++
    		return false
    	})
    	return count
    }
    
    // WalkFn is used when walking the tree. Takes a
    // key and value, returning if iteration should
    // be terminated.
    type WalkFn[T any] func(s netip.Prefix, v T) bool
    
    // DepthFirstWalk is used to walk the tree of the corresponding IP family
    func (t *Tree[T]) DepthFirstWalk(isIPv6 bool, fn WalkFn[T]) {
    	if isIPv6 {
    		recursiveWalk(t.rootV6, fn)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 31 21:05:04 UTC 2023
    - 17.7K bytes
    - Viewed (0)
  4. src/path/filepath/path_test.go

    		t.Helper()
    		sawFoo2 = false
    		err := walk(root)
    		if err != nil {
    			t.Fatal(err)
    		}
    		if sawFoo2 {
    			t.Errorf("SkipDir on file foo1 did not block processing of foo2")
    		}
    	}
    
    	t.Run("Walk", func(t *testing.T) {
    		Walk := func(root string) error { return filepath.Walk(td, walkFn) }
    		check(t, Walk, td)
    		check(t, Walk, filepath.Join(td, "dir"))
    	})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 22 16:38:19 UTC 2024
    - 47.1K bytes
    - Viewed (0)
  5. src/go/build/deps_test.go

    func listStdPkgs(goroot string) ([]string, error) {
    	// Based on cmd/go's matchPackages function.
    	var pkgs []string
    
    	src := filepath.Join(goroot, "src") + string(filepath.Separator)
    	walkFn := func(path string, d fs.DirEntry, err error) error {
    		if err != nil || !d.IsDir() || path == src {
    			return nil
    		}
    
    		base := filepath.Base(path)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 16:41:13 UTC 2024
    - 19.2K bytes
    - Viewed (0)
  6. src/cmd/go/internal/fsys/fsys_test.go

    			var got []string
    
    			err := Walk(tc.dir, func(path string, info fs.FileInfo, err error) error {
    				t.Logf("walk %q", path)
    				got = append(got, path)
    				if err != nil {
    					t.Errorf("walkfn: got non nil err argument: %v, want nil err argument", err)
    				}
    				return nil
    			})
    			if err != nil {
    				t.Errorf("Walk: got error %q, want nil", err)
    			}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 20 18:52:11 UTC 2023
    - 29.1K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/walk/walk.go

    const tmpstringbufsize = 32
    
    func Walk(fn *ir.Func) {
    	ir.CurFunc = fn
    	errorsBefore := base.Errors()
    	order(fn)
    	if base.Errors() > errorsBefore {
    		return
    	}
    
    	if base.Flag.W != 0 {
    		s := fmt.Sprintf("\nbefore walk %v", ir.CurFunc.Sym())
    		ir.DumpList(s, ir.CurFunc.Body)
    	}
    
    	walkStmtList(ir.CurFunc.Body)
    	if base.Flag.W != 0 {
    		s := fmt.Sprintf("after walk %v", ir.CurFunc.Sym())
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 27 20:56:00 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  8. cmd/metacache-walk.go

    			return nil
    		}
    
    		if s.walkMu != nil {
    			s.walkMu.Lock()
    		}
    		entries, err := s.ListDir(ctx, "", opts.Bucket, current, -1)
    		if s.walkMu != nil {
    			s.walkMu.Unlock()
    		}
    		if err != nil {
    			// Folder could have gone away in-between
    			if err != errVolumeNotFound && err != errFileNotFound {
    				internalLogOnceIf(ctx, err, "metacache-walk-scan-dir")
    			}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sat Jun 01 05:17:37 UTC 2024
    - 12.4K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/walk/expr.go

    			ir.CurFunc.SetHasDefer(true)
    			ir.CurFunc.SetOpenCodedDeferDisallowed(true)
    		}
    	}
    
    	walkCall1(n, init)
    	return n
    }
    
    func walkCall1(n *ir.CallExpr, init *ir.Nodes) {
    	if n.Walked() {
    		return // already walked
    	}
    	n.SetWalked(true)
    
    	if n.Op() == ir.OCALLMETH {
    		base.FatalfAt(n.Pos(), "OCALLMETH missed by typecheck")
    	}
    
    	args := n.Args
    	params := n.Fun.Type().Params()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:01 UTC 2024
    - 27.6K bytes
    - Viewed (0)
  10. platforms/core-configuration/model-core/src/test/groovy/org/gradle/internal/properties/annotations/AbstractTypeMetadataWalkerTest.groovy

        def "type walker should correctly visit empty type"() {
            given:
            def visitor = new TestStaticMetadataVisitor()
    
            when:
            TypeMetadataWalker.typeWalker(typeMetadataStore, TestNested.class).walk(TypeToken.of(MyEmptyTask), visitor)
    
            then:
            visitor.all == ["null::MyEmptyTask"]
        }
    
        def "instance walker should correctly visit instance with null values"() {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 24.4K bytes
    - Viewed (0)
Back to top