Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for DownloadDir (0.28 sec)

  1. src/cmd/go/internal/modcmd/verify.go

    	if modload.MainModules.Contains(mod.Path) {
    		return nil
    	}
    	var errs []error
    	zip, zipErr := modfetch.CachePath(ctx, mod, "zip")
    	if zipErr == nil {
    		_, zipErr = os.Stat(zip)
    	}
    	dir, dirErr := modfetch.DownloadDir(ctx, mod)
    	data, err := os.ReadFile(zip + "hash")
    	if err != nil {
    		if zipErr != nil && errors.Is(zipErr, fs.ErrNotExist) &&
    			dirErr != nil && errors.Is(dirErr, fs.ErrNotExist) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 21 16:56:35 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  2. src/cmd/go/internal/modfetch/cache.go

    }
    
    // DownloadDir returns the directory to which m should have been downloaded.
    // An error will be returned if the module path or version cannot be escaped.
    // An error satisfying errors.Is(err, fs.ErrNotExist) will be returned
    // along with the directory if the directory does not exist or if the directory
    // is not completely populated.
    func DownloadDir(ctx context.Context, m module.Version) (string, error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 18:15:22 UTC 2024
    - 24.7K bytes
    - Viewed (0)
  3. src/cmd/go/internal/modload/build.go

    						m.GoMod = gomod
    					}
    				}
    				if gomodsum, ok := modfetch.RecordedSum(modkey(mod)); ok {
    					m.GoModSum = gomodsum
    				}
    			}
    			if checksumOk("") {
    				dir, err := modfetch.DownloadDir(ctx, mod)
    				if err == nil {
    					m.Dir = dir
    				}
    				if sum, ok := modfetch.RecordedSum(mod); ok {
    					m.Sum = sum
    				}
    			}
    
    			if mode&ListRetracted != 0 {
    				addRetraction(ctx, m)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 16 16:56:39 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  4. src/cmd/go/internal/modfetch/fetch.go

    		return dir, nil
    	})
    }
    
    func download(ctx context.Context, mod module.Version) (dir string, err error) {
    	ctx, span := trace.StartSpan(ctx, "modfetch.download "+mod.String())
    	defer span.Done()
    
    	dir, err = DownloadDir(ctx, mod)
    	if err == nil {
    		// The directory has already been completely extracted (no .partial file exists).
    		return dir, nil
    	} else if dir == "" || !errors.Is(err, fs.ErrNotExist) {
    		return "", err
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 14:56:56 UTC 2024
    - 30.3K bytes
    - Viewed (0)
  5. src/cmd/go/internal/modload/load.go

    			root = repl.Path
    			if !filepath.IsAbs(root) {
    				root = filepath.Join(replaceRelativeTo(), root)
    			}
    		} else if repl.Path != "" {
    			root, err = modfetch.DownloadDir(ctx, repl)
    		} else {
    			root, err = modfetch.DownloadDir(ctx, m)
    		}
    		if err != nil {
    			return "", false
    		}
    
    		sub := search.InDir(dir, root)
    		if sub == "" {
    			return "", false
    		}
    		sub = filepath.ToSlash(sub)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 14:56:56 UTC 2024
    - 84K bytes
    - Viewed (0)
Back to top