- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for readGoInfo (0.17 sec)
-
src/go/build/read_test.go
package build import ( "fmt" "go/token" "io" "strings" "testing" ) const quote = "`" type readTest struct { // Test input contains ℙ where readGoInfo should stop. in string err string } var readGoInfoTests = []readTest{ { `package p`, "", }, { `package p; import "x"`, "", }, { `package p; import . "x"`, "",
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 06 15:53:04 UTC 2021 - 6K bytes - Viewed (0) -
src/cmd/go/internal/modindex/build_read.go
r.buf = r.buf[:len(r.buf)-1] } return r.buf, r.err } // readGoInfo expects a Go file as input and reads the file up to and including the import section. // It records what it learned in *info. // If info.fset is non-nil, readGoInfo parses the file and sets info.parsed, info.parseErr, // info.imports and info.embeds. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 23 10:10:21 UTC 2023 - 13K bytes - Viewed (0) -
src/go/build/read.go
r.buf = r.buf[:len(r.buf)-1] } return r.buf, r.err } // readGoInfo expects a Go file as input and reads the file up to and including the import section. // It records what it learned in *info. // If info.fset is non-nil, readGoInfo parses the file and sets info.parsed, info.parseErr, // info.imports and info.embeds. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 16:25:21 UTC 2024 - 14.1K bytes - Viewed (0) -
src/go/build/deps_test.go
continue } info := fileInfo{ name: filepath.Join(dir, name), fset: fset, } f, err := os.Open(info.name) if err != nil { return nil, err } err = readGoInfo(f, &info) f.Close() if err != nil { return nil, fmt.Errorf("reading %v: %v", name, err) } if info.parsed.Name.Name == "main" { continue } if bytes.Contains(info.header, buildIgnore) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 24 16:41:13 UTC 2024 - 19.2K bytes - Viewed (0) -
src/cmd/go/internal/modindex/build.go
return nil, err } // TODO(matloob) should we decide whether to ignore binary only here or earlier // when we create the index file? var ignoreBinaryOnly bool if strings.HasSuffix(name, ".go") { err = readGoInfo(f, info) if strings.HasSuffix(name, "_test.go") { ignoreBinaryOnly = true // ignore //go:binary-only-package comments in _test.go files } } else { info.header, err = readComments(f) } f.Close()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Aug 25 17:39:23 UTC 2023 - 26.8K bytes - Viewed (0) -
src/go/build/build.go
// binary, no reading return info, nil } f, err := ctxt.openFile(info.name) if err != nil { return nil, err } if strings.HasSuffix(name, ".go") { err = readGoInfo(f, info) if strings.HasSuffix(name, "_test.go") { binaryOnly = nil // ignore //go:binary-only-package comments in _test.go files } } else {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 16:25:21 UTC 2024 - 62.3K bytes - Viewed (0)