- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for isGoFile (0.34 sec)
-
src/go/doc/headscan.go
verbose = flag.Bool("v", false, "verbose mode") ) // ToHTML in comment.go assigns a (possibly blank) ID to each heading var html_h = regexp.MustCompile(`<h3 id="[^"]*">`) const html_endh = "</h3>\n" func isGoFile(fi fs.FileInfo) bool { return strings.HasSuffix(fi.Name(), ".go") && !strings.HasSuffix(fi.Name(), "_test.go") } func appendHeadings(list []string, comment string) []string { var buf strings.Builder
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 06 21:50:52 UTC 2022 - 2.5K bytes - Viewed (0) -
test/stress/parsego.go
import ( "go/ast" "go/parser" "go/token" "os" "path" "runtime" "strings" ) func isGoFile(dir os.FileInfo) bool { return !dir.IsDir() && !strings.HasPrefix(dir.Name(), ".") && // ignore .files path.Ext(dir.Name()) == ".go" } func isPkgFile(dir os.FileInfo) bool { return isGoFile(dir) && !strings.HasSuffix(dir.Name(), "_test.go") // ignore test files } func pkgName(filename string) string {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 02 13:43:18 UTC 2016 - 4.1K bytes - Viewed (0) -
src/go/doc/doc_test.go
} func isGoFile(fi fs.FileInfo) bool { name := fi.Name() return !fi.IsDir() && len(name) > 0 && name[0] != '.' && // ignore .files filepath.Ext(name) == ".go" } type bundle struct { *Package FSet *token.FileSet } func test(t *testing.T, mode Mode) { // determine file filter filter := isGoFile if *files != "" { rx, err := regexp.Compile(*files)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 11 16:31:52 UTC 2022 - 6.7K bytes - Viewed (0) -
src/cmd/fix/main.go
func walkDir(path string) { filepath.WalkDir(path, visitFile) } func visitFile(path string, f fs.DirEntry, err error) error { if err == nil && isGoFile(f) { err = processFile(path, false) } if err != nil { report(err) } return nil } func isGoFile(f fs.DirEntry) bool { // ignore non-Go files name := f.Name() return !f.IsDir() && !strings.HasPrefix(name, ".") && strings.HasSuffix(name, ".go")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 19:41:17 UTC 2024 - 5.4K bytes - Viewed (0) -
src/cmd/gofmt/long_test.go
defer close(filenames) handleFile := func(filename string, d fs.DirEntry, err error) error { if err != nil { t.Error(err) return nil } // don't descend into testdata directories if isGoFile(d) && !strings.Contains(filepath.ToSlash(filename), "/testdata/") { filenames <- filename nfiles++ } return nil } // test Go files provided via -files, if any if *files != "" {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 12 20:27:28 UTC 2023 - 3.8K bytes - Viewed (0) -
src/cmd/gofmt/gofmt.go
} // It's only -r that makes use of go/ast's object resolution, // so avoid the unnecessary work if the flag isn't used. if *rewriteRule == "" { parserMode |= parser.SkipObjectResolution } } func isGoFile(f fs.DirEntry) bool { // ignore non-Go files name := f.Name() return !strings.HasPrefix(name, ".") && strings.HasSuffix(name, ".go") && !f.IsDir() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 19:41:17 UTC 2024 - 15.1K bytes - Viewed (0)