- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 14 for maxSize (0.57 sec)
-
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) -
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) -
src/cmd/go/internal/modfetch/codehost/git.go
return false, nil } return false, err } func (r *gitRepo) ReadZip(ctx context.Context, rev, subdir string, maxSize int64) (zip io.ReadCloser, err error) { // TODO: Use maxSize or drop it. args := []string{} if subdir != "" { args = append(args, "--", subdir) } info, err := r.Stat(ctx, rev) // download rev into local git repo if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 11 22:10:38 UTC 2024 - 27.4K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/mod/zip/zip.go
addError(p, true, errSymlink) continue } if !info.Mode().IsRegular() { addError(p, true, errNotRegular) continue } size := info.Size() if size >= 0 && size <= maxSize { maxSize -= size } else if cf.SizeError == nil { cf.SizeError = fmt.Errorf("module source tree too large (max size is %d bytes)", MaxZipFile) } if p == "go.mod" && size > MaxGoMod {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jul 12 20:38:21 UTC 2023 - 31K bytes - Viewed (0) -
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) -
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) -
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) -
src/cmd/compile/internal/ssa/numberlines.go
} total += uint64(v.lp.last - v.lp.first) if maxfile < v.f { maxfile = v.f } if minline > v.lp.first { minline = v.lp.first } if maxline < v.lp.last { maxline = v.lp.last } } f.LogStat("SUM_LINE_RANGE", total, "MAXMIN_LINE_RANGE", maxline-minline, "MAXFILE", maxfile, "NFILES", len(entries)) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 14 21:26:13 UTC 2023 - 7.8K bytes - Viewed (0) -
src/cmd/gofmt/gofmt.go
// reporter will be sequential relative to the other tasks in the sequencer. // // If f invokes a method on the reporter, execution of that method may block // until the previous task has finished. (To maximize concurrency, f should // avoid invoking the reporter until it has finished any parallelizable work.) // // If f returns a non-nil error, that error will be reported after f's output
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 19:41:17 UTC 2024 - 15.1K bytes - Viewed (0) -
src/archive/tar/writer.go
paxHdrs[paxGNUSparseMajor] = "1" paxHdrs[paxGNUSparseMinor] = "0" paxHdrs[paxGNUSparseName] = realName paxHdrs[paxGNUSparseRealSize] = strconv.FormatInt(realSize, 10) paxHdrs[paxSize] = strconv.FormatInt(hdr.Size, 10) delete(paxHdrs, paxPath) // Recorded by paxGNUSparseName } */ _ = realSize // Write PAX records to the output. isGlobal := hdr.Typeflag == TypeXGlobalHeader
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 19.6K bytes - Viewed (0)