Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 119 for goFiles (0.22 sec)

  1. src/go/doc/doc.go

    	var (
    		goFiles     = make(map[string]*ast.File)
    		testGoFiles []*ast.File
    	)
    	for i := range files {
    		f := fset.File(files[i].Pos())
    		if f == nil {
    			return nil, fmt.Errorf("file files[%d] is not found in the provided file set", i)
    		}
    		switch name := f.Name(); {
    		case strings.HasSuffix(name, ".go") && !strings.HasSuffix(name, "_test.go"):
    			goFiles[name] = files[i]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 11.2K bytes
    - Viewed (0)
  2. cmd/import-boss/main.go

    	return errs
    }
    
    // packageDir tries to figure out the directory of the specified package.
    func packageDir(pkg *packages.Package) string {
    	if len(pkg.GoFiles) > 0 {
    		return filepath.Dir(pkg.GoFiles[0])
    	}
    	if len(pkg.IgnoredFiles) > 0 {
    		return filepath.Dir(pkg.IgnoredFiles[0])
    	}
    	return ""
    }
    
    type FileFormat struct {
    	Rules        []Rule
    	InverseRules []Rule
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 16 12:36:49 UTC 2024
    - 14.7K bytes
    - Viewed (0)
  3. src/cmd/go/internal/work/gccgo.go

    	return nil
    }
    
    func (tools gccgoToolchain) asm(b *Builder, a *Action, sfiles []string) ([]string, error) {
    	p := a.Package
    	var ofiles []string
    	for _, sfile := range sfiles {
    		base := filepath.Base(sfile)
    		ofile := a.Objdir + base[:len(base)-len(".s")] + ".o"
    		ofiles = append(ofiles, ofile)
    		sfile, _ = fsys.OverlayPath(mkAbs(p.Dir, sfile))
    		defs := []string{"-D", "GOOS_" + cfg.Goos, "-D", "GOARCH_" + cfg.Goarch}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 02 22:18:34 UTC 2024
    - 19K bytes
    - Viewed (0)
  4. src/cmd/go/internal/load/pkg.go

    // exeFromFiles returns an executable name for a package
    // using the first element in GoFiles or CgoFiles collections without the prefix.
    //
    // Returns empty string in case of empty collection.
    func (p *Package) exeFromFiles() string {
    	var src string
    	if len(p.GoFiles) > 0 {
    		src = p.GoFiles[0]
    	} else if len(p.CgoFiles) > 0 {
    		src = p.CgoFiles[0]
    	} else {
    		return ""
    	}
    	_, elem := filepath.Split(src)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 28 17:00:51 UTC 2024
    - 120K bytes
    - Viewed (0)
  5. src/cmd/go/internal/list/list.go

    files presented to the compiler. Typically this means that it repeats
    the files listed in GoFiles and then also adds the Go code generated
    by processing CgoFiles and SwigFiles. The Imports list contains the
    union of all imports from both GoFiles and CompiledGoFiles.
    
    The -deps flag causes list to iterate over not just the named packages
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 16 16:56:39 UTC 2024
    - 33.3K bytes
    - Viewed (0)
  6. 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)
  7. misc/go_android_exec/main.go

    			if err := adbCopyTree(deviceCwd, importPath); err != nil {
    				return 0, err
    			}
    
    			// Copy .go files from the package.
    			goFiles, err := filepath.Glob("*.go")
    			if err != nil {
    				return 0, err
    			}
    			if len(goFiles) > 0 {
    				args := append(append([]string{"push"}, goFiles...), deviceCwd)
    				if err := adb(args...); err != nil {
    					return 0, err
    				}
    			}
    		}
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 21 17:46:57 UTC 2023
    - 15.3K bytes
    - Viewed (0)
  8. 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) {
    	if len(args) == 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 18 17:59:44 UTC 2022
    - 8.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/cmd/dist/build.go

    		if !t.IsZero() && !strings.HasSuffix(p, ".a") && !shouldbuild(p, pkg) {
    			return false
    		}
    		if strings.HasSuffix(p, ".go") {
    			gofiles = append(gofiles, p)
    		} else if strings.HasSuffix(p, ".s") {
    			sfiles = append(sfiles, p)
    		}
    		if t.After(ttarg) {
    			stale = true
    		}
    		return true
    	})
    
    	// If there are no files to compile, we're done.
    	if len(files) == 0 {
    		return
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 18:34:40 UTC 2024
    - 54K bytes
    - Viewed (0)
Back to top