Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for CheckAllowed (0.83 sec)

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

    	if m.Version == "" && MainModules.Contains(m.Path) {
    		return module.Version{Path: m.Path, Version: "none"}, nil
    	}
    
    	list, _, err := versions(ctx, m.Path, CheckAllowed)
    	if err != nil {
    		if errors.Is(err, os.ErrNotExist) {
    			return module.Version{Path: m.Path, Version: "none"}, nil
    		}
    		return module.Version{}, err
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 23 19:01:38 UTC 2023
    - 4K bytes
    - Viewed (0)
  2. src/cmd/go/internal/modload/build.go

    func addUpdate(ctx context.Context, m *modinfo.ModulePublic) {
    	if m.Version == "" {
    		return
    	}
    
    	info, err := Query(ctx, m.Path, "upgrade", m.Version, CheckAllowed)
    	var noVersionErr *NoMatchingVersionError
    	if errors.Is(err, ErrDisallowed) ||
    		errors.Is(err, fs.ErrNotExist) ||
    		errors.As(err, &noVersionErr) {
    		// Ignore "not found" and "no matching version" errors.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 16 16:56:39 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  3. src/cmd/go/internal/modload/list.go

    					// The module graph is incomplete, so we don't know what version we're
    					// actually upgrading from.
    					// mgErr is already set, so just skip this module.
    					continue
    				}
    			}
    
    			allowed := CheckAllowed
    			if IsRevisionQuery(path, vers) || mode&ListRetracted != 0 {
    				// Allow excluded and retracted versions if the user asked for a
    				// specific revision or used 'go list -retracted'.
    				allowed = nil
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 17 22:43:50 UTC 2023
    - 8.8K bytes
    - Viewed (0)
  4. src/cmd/go/internal/modload/modfile.go

    		// dependencies, so they cannot be pruned out.
    		return unpruned
    	}
    	return pruned
    }
    
    // CheckAllowed returns an error equivalent to ErrDisallowed if m is excluded by
    // the main module's go.mod or retracted by its author. Most version queries use
    // this to filter out versions that should not be used.
    func CheckAllowed(ctx context.Context, m module.Version) error {
    	if err := CheckExclusions(ctx, m); err != nil {
    		return err
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 26 17:53:40 UTC 2023
    - 26.7K bytes
    - Viewed (0)
  5. src/cmd/go/internal/toolchain/select.go

    	modload.ForceUseModules = true
    	modload.RootMode = modload.NoRoot
    	modload.Init()
    	defer modload.Reset()
    
    	// See internal/load.PackagesAndErrorsOutsideModule
    	ctx := context.Background()
    	allowed := modload.CheckAllowed
    	if modload.IsRevisionQuery(path, version) {
    		// Don't check for retractions if a specific revision is requested.
    		allowed = nil
    	}
    	noneSelected := func(path string) (version string) { return "none" }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 17:25:05 UTC 2024
    - 23.4K bytes
    - Viewed (0)
  6. src/cmd/go/internal/modload/import.go

    	mg, err := rs.Graph(ctx)
    	if err != nil {
    		return module.Version{}, err
    	}
    
    	candidates, err := QueryPackages(ctx, path, "latest", mg.Selected, CheckAllowed)
    	if err != nil {
    		if errors.Is(err, fs.ErrNotExist) {
    			// Return "cannot find module providing package […]" instead of whatever
    			// low-level error QueryPattern produced.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 15:21:14 UTC 2024
    - 27.7K bytes
    - Viewed (0)
  7. src/cmd/go/internal/modget/get.go

    		for _, qr := range results {
    			pkgMods = append(pkgMods, qr.Mod)
    		}
    	}
    	if modOnly != nil {
    		mod = modOnly.Mod
    	}
    	return pkgMods, mod, err
    }
    
    // checkAllowedOr is like modload.CheckAllowed, but it always allows the requested
    // and current versions (even if they are retracted or otherwise excluded).
    func (r *resolver) checkAllowedOr(requested string, selected func(string) string) modload.AllowedFunc {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 18:26:32 UTC 2024
    - 66.5K bytes
    - Viewed (0)
  8. src/cmd/go/internal/load/pkg.go

    	// (first result). It's possible this module won't provide packages named by
    	// later arguments, and other modules would. Let's not try to be too
    	// magical though.
    	allowed := modload.CheckAllowed
    	if modload.IsRevisionQuery(firstPath, version) {
    		// Don't check for retractions if a specific revision is requested.
    		allowed = nil
    	}
    	noneSelected := func(path string) (version string) { return "none" }
    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