Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for matchPackages (0.25 sec)

  1. src/cmd/go/internal/modload/search.go

    )
    
    type stdFilter int8
    
    const (
    	omitStd = stdFilter(iota)
    	includeStd
    )
    
    // matchPackages is like m.MatchPackages, but uses a local variable (rather than
    // a global) for tags, can include or exclude packages in the standard library,
    // and is restricted to the given list of modules.
    func matchPackages(ctx context.Context, m *search.Match, tags map[string]bool, filter stdFilter, modules []module.Version) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 08 17:55:15 UTC 2023
    - 7.9K bytes
    - Viewed (0)
  2. src/cmd/go/internal/search/search.go

    //
    // If any errors may have caused the set of packages to be incomplete,
    // MatchPackages appends those errors to m.Errs.
    func (m *Match) MatchPackages() {
    	m.Pkgs = []string{}
    	if m.IsLocal() {
    		m.AddError(fmt.Errorf("internal error: MatchPackages: %s is not a valid package pattern", m.pattern))
    		return
    	}
    
    	if m.IsLiteral() {
    		m.Pkgs = []string{m.pattern}
    		return
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 31 20:33:05 UTC 2023
    - 15.4K bytes
    - Viewed (0)
  3. src/go/build/deps_test.go

    	CGO, internal/syscall/unix < net/internal/cgotest;
    
    
    `
    
    // listStdPkgs returns the same list of packages as "go list std".
    func listStdPkgs(goroot string) ([]string, error) {
    	// Based on cmd/go's matchPackages function.
    	var pkgs []string
    
    	src := filepath.Join(goroot, "src") + string(filepath.Separator)
    	walkFn := func(path string, d fs.DirEntry, err error) error {
    		if err != nil || !d.IsDir() || path == src {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 16:41:13 UTC 2024
    - 19.2K bytes
    - Viewed (0)
  4. src/cmd/go/internal/modload/load.go

    					}
    					matchPackages(ctx, m, opts.Tags, omitStd, matchModules)
    				} else {
    					// Starting with the packages in the main module,
    					// enumerate the full list of "all".
    					m.Pkgs = ld.computePatternAll()
    				}
    
    			case m.Pattern() == "std" || m.Pattern() == "cmd":
    				if m.Pkgs == nil {
    					m.MatchPackages() // Locate the packages within GOROOT/src.
    				}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 14:56:56 UTC 2024
    - 84K bytes
    - Viewed (0)
  5. src/cmd/go/internal/modload/query.go

    			return nil, nil, &WildcardInFirstElementError{Pattern: pattern, Query: query}
    		}
    		match = func(mod module.Version, roots []string, isLocal bool) *search.Match {
    			m := search.NewMatch(pattern)
    			matchPackages(ctx, m, imports.AnyTags(), omitStd, []module.Version{mod})
    			return m
    		}
    	} else {
    		match = func(mod module.Version, roots []string, isLocal bool) *search.Match {
    			m := search.NewMatch(pattern)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 11 22:29:11 UTC 2023
    - 44.7K bytes
    - Viewed (0)
  6. src/cmd/go/internal/load/search.go

    package load
    
    import (
    	"path/filepath"
    	"strings"
    
    	"cmd/go/internal/search"
    	"cmd/internal/pkgpattern"
    )
    
    // MatchPackage(pattern, cwd)(p) reports whether package p matches pattern in the working directory cwd.
    func MatchPackage(pattern, cwd string) func(*Package) bool {
    	switch {
    	case search.IsRelativePath(pattern):
    		// Split pattern into leading pattern-free directory path
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 27 16:43:40 UTC 2022
    - 1.7K bytes
    - Viewed (0)
  7. src/cmd/go/internal/load/flag.go

    		}
    		if v[0] == '\'' || v[0] == '"' {
    			return fmt.Errorf("parameter may not start with quote character %c", v[0])
    		}
    		pattern := strings.TrimSpace(v[:i])
    		match = MatchPackage(pattern, cwd)
    		v = v[i+1:]
    	}
    	flags, err := quoted.Split(v)
    	if err != nil {
    		return err
    	}
    	if flags == nil {
    		flags = []string{}
    	}
    	f.values = append(f.values, ppfValue{match, flags})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 19 20:20:43 UTC 2022
    - 2.6K bytes
    - Viewed (0)
  8. src/cmd/go/internal/test/test.go

    	var writeCoverMetaAct *work.Action
    
    	if cfg.BuildCoverPkg != nil {
    		match := make([]func(*load.Package) bool, len(cfg.BuildCoverPkg))
    		for i := range cfg.BuildCoverPkg {
    			match[i] = load.MatchPackage(cfg.BuildCoverPkg[i], base.Cwd())
    		}
    
    		// Select for coverage all dependencies matching the -coverpkg
    		// patterns.
    		plist := load.TestPackageList(ctx, pkgOpts, pkgs)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 14:34:32 UTC 2024
    - 71.9K bytes
    - Viewed (0)
  9. src/cmd/go/internal/load/pkg.go

    		// the specific packages selected by the user-specified pattern(s).
    		match = make([]func(*Package) bool, len(cfg.BuildCoverPkg))
    		for i := range cfg.BuildCoverPkg {
    			match[i] = MatchPackage(cfg.BuildCoverPkg[i], base.Cwd())
    		}
    	} else {
    		// Without -coverpkg, instrument only packages in the main module
    		// (if any), as well as packages/files specifically named on the
    		// command line.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 28 17:00:51 UTC 2024
    - 120K bytes
    - Viewed (0)
Back to top