- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for ReadImports (0.11 sec)
-
src/go/build/read_test.go
"syntax error", }, { `package p; import ("x"`, "syntax error", }, } func TestReadFailuresIgnored(t *testing.T) { // Syntax errors should not be reported (false arg to readImports). // Instead, entire file should be the output and no error. // Convert tests not to return syntax errors. tests := make([]readTest, len(readFailuresTests)) copy(tests, readFailuresTests) for i := range tests {
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/modcmd/vendor.go
} } if strings.HasSuffix(info.Name(), ".go") { f, err := fsys.Open(filepath.Join(dir, info.Name())) if err != nil { base.Fatal(err) } defer f.Close() content, err := imports.ReadImports(f, false, nil) if err == nil && !imports.ShouldBuild(content, imports.AnyTags()) { // The file is explicitly tagged "ignore", so it can't affect the build. // Leave it out. return false }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 14 14:19:59 UTC 2024 - 14.5K bytes - Viewed (0) -
src/cmd/dist/build.go
// the generated files. } // Resolve imported packages to actual package paths. // Make sure they're installed. importMap := make(map[string]string) for _, p := range gofiles { for _, imp := range readimports(p) { if imp == "C" { fatalf("%s imports C", p) } importMap[imp] = resolveVendor(imp, dir) } } sortedImports := make([]string, 0, len(importMap)) for imp := range importMap {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 18:34:40 UTC 2024 - 54K bytes - Viewed (0)