Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for maxTime (1.38 sec)

  1. src/cmd/go/internal/modfetch/codehost/vcs.go

    	return info, nil
    }
    
    func (r *vcsRepo) Latest(ctx context.Context) (*RevInfo, error) {
    	return r.Stat(ctx, "latest")
    }
    
    func (r *vcsRepo) ReadFile(ctx context.Context, rev, file string, maxSize int64) ([]byte, error) {
    	if rev == "latest" {
    		rev = r.cmd.latest
    	}
    	_, err := r.Stat(ctx, rev) // download rev into local repo
    	if err != nil {
    		return nil, err
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Apr 14 18:50:24 UTC 2024
    - 17.3K bytes
    - Viewed (0)
  2. src/bytes/bytes_test.go

    }
    
    func BenchmarkEqualBothUnaligned(b *testing.B) {
    	sizes := []int{64, 4 << 10}
    	if !isRaceBuilder {
    		sizes = append(sizes, []int{4 << 20, 64 << 20}...)
    	}
    	maxSize := 2 * (sizes[len(sizes)-1] + 8)
    	if len(bmbuf) < maxSize {
    		bmbuf = make([]byte, maxSize)
    	}
    
    	for _, n := range sizes {
    		for _, off := range []int{0, 1, 4, 7} {
    			buf1 := bmbuf[off : off+n]
    			buf2Start := (len(bmbuf) / 2) + off
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 12:58:37 UTC 2024
    - 56.5K bytes
    - Viewed (0)
  3. src/archive/tar/writer_test.go

    		if ok1 || ok2 {
    			return ok1 && ok2
    		}
    		return x == y
    	}
    	for _, v := range vectors {
    		t.Run(path.Base(v.file), func(t *testing.T) {
    			const maxSize = 10 << 10 // 10KiB
    			buf := new(bytes.Buffer)
    			tw := NewWriter(iotest.TruncateWriter(buf, maxSize))
    
    			for i, tf := range v.tests {
    				switch tf := tf.(type) {
    				case testHeader:
    					err := tw.WriteHeader(&tf.hdr)
    					if !equalError(err, tf.wantErr) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 38.7K bytes
    - Viewed (0)
  4. src/cmd/go/internal/modfetch/codehost/codehost.go

    	// ReadFile reads the given file in the file tree corresponding to revision rev.
    	// It should refuse to read more than maxSize bytes.
    	//
    	// If the requested file does not exist it should return an error for which
    	// os.IsNotExist(err) returns true.
    	ReadFile(ctx context.Context, rev, file string, maxSize int64) (data []byte, err error)
    
    	// ReadZip downloads a zip file for the subdir subdirectory
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Apr 14 18:50:24 UTC 2024
    - 12.8K bytes
    - Viewed (0)
  5. src/cmd/go/internal/modfetch/coderepo.go

    		return err
    	}
    	defer os.Remove(f.Name())
    	defer f.Close()
    	maxSize := int64(codehost.MaxZipFile)
    	lr := &io.LimitedReader{R: dl, N: maxSize + 1}
    	if _, err := io.Copy(f, lr); err != nil {
    		dl.Close()
    		return err
    	}
    	dl.Close()
    	if lr.N <= 0 {
    		return fmt.Errorf("downloaded zip file too large")
    	}
    	size := (maxSize + 1) - lr.N
    	if _, err := f.Seek(0, 0); err != nil {
    		return err
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Apr 14 18:50:24 UTC 2024
    - 38.4K bytes
    - Viewed (0)
Back to top