Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for hasGoFiles (2.16 sec)

  1. src/cmd/doc/dirs.go

    			if err != nil {
    				log.Print(err)
    				continue
    			}
    			hasGoFiles := false
    			for _, entry := range entries {
    				name := entry.Name()
    				// For plain files, remember if this directory contains any .go
    				// source files, but ignore them otherwise.
    				if !entry.IsDir() {
    					if !hasGoFiles && strings.HasSuffix(name, ".go") {
    						hasGoFiles = true
    					}
    					continue
    				}
    				// Entry is a directory.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 17:49:12 UTC 2022
    - 9K bytes
    - Viewed (0)
  2. src/go/internal/srcimporter/srcimporter_test.go

    	}
    
    	nimports := 0
    	hasGoFiles := false
    	for _, f := range list {
    		if f.IsDir() {
    			n, abort := walkDir(t, filepath.Join(path, f.Name()), endTime)
    			nimports += n
    			if abort {
    				return nimports, true
    			}
    		} else if strings.HasSuffix(f.Name(), ".go") {
    			hasGoFiles = true
    		}
    	}
    
    	if hasGoFiles {
    		doImport(t, path, "")
    		nimports++
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 12:00:02 UTC 2023
    - 6.5K bytes
    - Viewed (0)
  3. src/go/build/build.go

    			return false
    		}
    	}
    	return true
    }
    
    // hasGoFiles reports whether dir contains any files with names ending in .go.
    // For a vendor check we must exclude directories that contain no .go files.
    // Otherwise it is not possible to vendor just a/b/c and still import the
    // non-vendored a/b. See golang.org/issue/13832.
    func hasGoFiles(ctxt *Context, dir string) bool {
    	ents, _ := ctxt.readDir(dir)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 62.3K bytes
    - Viewed (0)
  4. src/cmd/go/internal/load/pkg.go

    			}
    		}
    		limit = i
    	}
    	return path
    }
    
    // hasGoFiles reports whether dir contains any files with names ending in .go.
    // For a vendor check we must exclude directories that contain no .go files.
    // Otherwise it is not possible to vendor just a/b/c and still import the
    // non-vendored a/b. See golang.org/issue/13832.
    func hasGoFiles(dir string) bool {
    	files, _ := os.ReadDir(dir)
    	for _, f := range files {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 28 17:00:51 UTC 2024
    - 120K bytes
    - Viewed (0)
Back to top