- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for fileExports (0.29 sec)
-
src/go/ast/filter.go
return IsExported(name) } // FileExports trims the AST for a Go source file in place such that // only exported nodes remain: all top-level identifiers which are not exported // and their associated information (such as type, initial value, or function // body) are removed. Non-exported fields and methods of exported types are // stripped. The [File.Comments] list is not changed. // // FileExports reports whether there are exported declarations.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 13.3K bytes - Viewed (0) -
src/go/printer/printer_test.go
f, err := parser.ParseFile(fset, "", src, parser.ParseComments) if err != nil { return nil, fmt.Errorf("parse: %s\n%s", err, src) } // filter exports if necessary if mode&export != 0 { ast.FileExports(f) // ignore result f.Comments = nil // don't print comments that are not in AST } // determine printer configuration cfg := Config{Tabwidth: tabwidth} if mode&rawFormat != 0 { cfg.Mode |= RawFormat
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 03 14:56:25 UTC 2024 - 20.4K bytes - Viewed (0) -
src/go/doc/reader.go
r.filenames[i] = filename i++ } slices.Sort(r.filenames) // process files in sorted order for _, filename := range r.filenames { f := pkg.Files[filename] if mode&AllDecls == 0 { r.fileExports(f) } r.readFile(f) } for name, path := range r.importByName { if path == "" { delete(r.importByName, name) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 27.5K bytes - Viewed (0)