Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for GoFiles (0.15 sec)

  1. src/cmd/go/testdata/script/list_load_err.txt

    [cgo] stdout m/want
    
    
    # go list -e should include files with errors in GoFiles, TestGoFiles, and
    # other lists, assuming they match constraints.
    # Verifies golang.org/issue/39986
    go list -e -f '{{range .GoFiles}}{{.}},{{end}}' ./scan
    stdout '^good.go,scan.go,$'
    
    go list -e -f '{{range .GoFiles}}{{.}},{{end}}' ./multi
    stdout '^a.go,b.go,$'
    
    go list -e -f '{{range .GoFiles}}{{.}},{{end}}' ./constraint
    stdout '^good.go,$'
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 17 21:46:33 UTC 2022
    - 1.7K bytes
    - Viewed (0)
  2. src/cmd/go/internal/load/pkg_test.go

    			pkg.ImportPath = tt.in
    			pkg.GoFiles = tt.files
    			pkg.Internal.CmdlineFiles = len(tt.files) > 0
    			gotMod := pkg.DefaultExecName()
    			if gotMod != tt.wantMod {
    				t.Errorf("pkg.DefaultExecName with ImportPath = %q in module mode = %v; want %v", tt.in, gotMod, tt.wantMod)
    			}
    		}
    		{
    			cfg.ModulesEnabled = false
    			pkg := new(Package)
    			pkg.ImportPath = tt.in
    			pkg.GoFiles = tt.files
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 09 14:05:53 UTC 2022
    - 2.4K bytes
    - Viewed (0)
  3. src/cmd/go/internal/vet/vet.go

    		if err != nil {
    			base.Errorf("%v", err)
    			continue
    		}
    		if len(ptest.GoFiles) == 0 && len(ptest.CgoFiles) == 0 && pxtest == nil {
    			base.Errorf("go: can't vet %s: no Go files in %s", p.ImportPath, p.Dir)
    			continue
    		}
    		if len(ptest.GoFiles) > 0 || len(ptest.CgoFiles) > 0 {
    			root.Deps = append(root.Deps, b.VetAction(work.ModeBuild, work.ModeBuild, ptest))
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 06 19:23:42 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  4. src/cmd/go/testdata/script/list_json_fields.txt

    cmp stdout want-non-json.txt
    
    # Test -json=<field> keeps only that field.
    go list -json=Name
    cmp stdout want-json-name.txt
    
    # Test -json=<field> with multiple fields.
    go list -json=ImportPath,Name,GoFiles,Imports
    cmp stdout want-json-multiple.txt
    
    # Test -json=<field> with Deps outputs the Deps field.
    go list -json=Deps
    stdout '"Deps": \['
    stdout '"errors",'
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 23 15:24:16 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  5. src/cmd/go/internal/fmtcmd/fmt.go

    				// Skip this error, as we will format
    				// all files regardless.
    			} else {
    				base.Errorf("%v", pkg.Error)
    				continue
    			}
    		}
    		// Use pkg.gofiles instead of pkg.Dir so that
    		// the command only applies to this package,
    		// not to packages in subdirectories.
    		files := base.RelPaths(pkg.InternalAllGoFiles())
    		for _, file := range files {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 03 12:16:35 UTC 2022
    - 3K bytes
    - Viewed (0)
  6. src/cmd/go/internal/fix/fix.go

    		if modload.Enabled() && pkg.Module != nil && !pkg.Module.Main {
    			if !printed {
    				fmt.Fprintf(os.Stderr, "go: not fixing packages in dependency modules\n")
    				printed = true
    			}
    			continue
    		}
    		// Use pkg.gofiles instead of pkg.Dir so that
    		// the command only applies to this package,
    		// not to packages in subdirectories.
    		files := base.RelPaths(pkg.InternalAllGoFiles())
    		goVersion := ""
    		if pkg.Module != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 05 17:52:29 UTC 2022
    - 2.2K bytes
    - Viewed (0)
  7. src/cmd/go/internal/run/run.go

    	p.Internal.OmitDebug = true
    	p.Target = "" // must build - not up to date
    	if p.Internal.CmdlineFiles {
    		//set executable name if go file is given as cmd-argument
    		var src string
    		if len(p.GoFiles) > 0 {
    			src = p.GoFiles[0]
    		} else if len(p.CgoFiles) > 0 {
    			src = p.CgoFiles[0]
    		} else {
    			// this case could only happen if the provided source uses cgo
    			// while cgo is disabled.
    			hint := ""
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 19:09:38 UTC 2023
    - 6.9K bytes
    - Viewed (0)
  8. src/cmd/go/testdata/script/mod_gobuild_import.txt

    		log.Fatal(err)
    	}
    	if p1.Dir != p2.Dir {
    		log.Fatalf("different packages loaded with relative and absolute paths:\n\t%s\n\t%s", p1.Dir, p2.Dir)
    	}
    
    	fmt.Printf("%s\n%s\n", p1.Dir, strings.Join(p1.GoFiles, " "))
    }
    
    -- testfindonly/x.go --
    package main
    
    import (
    	"fmt"
    	"go/build"
    	"os"
    )
    
    func main() {
    	p, err := build.Import(os.Args[1], os.Args[2], build.FindOnly)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 24 21:18:16 UTC 2022
    - 3K bytes
    - Viewed (0)
  9. src/runtime/align_test.go

    	ctxt := build.Default
    	ctxt.CgoEnabled = true
    	pkg, err := ctxt.ImportDir(dir, 0)
    	if err != nil {
    		t.Fatalf("can't find buildable files: %v", err)
    	}
    	return pkg.GoFiles
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 08 14:52:12 UTC 2023
    - 5.4K bytes
    - Viewed (0)
  10. src/go/types/gotype.go

    	if _, nogo := err.(*build.NoGoError); err != nil && !nogo {
    		return nil, err
    	}
    
    	if *xtestFiles {
    		return parseFiles(dir, pkginfo.XTestGoFiles)
    	}
    
    	filenames := append(pkginfo.GoFiles, pkginfo.CgoFiles...)
    	if *testFiles {
    		filenames = append(filenames, pkginfo.TestGoFiles...)
    	}
    	return parseFiles(dir, filenames)
    }
    
    func getPkgFiles(args []string) ([]*ast.File, error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 18 17:59:44 UTC 2022
    - 8.3K bytes
    - Viewed (0)
Back to top