- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 39 for count (0.17 sec)
-
src/bytes/bytes.go
// Repeat returns a new byte slice consisting of count copies of b. // // It panics if count is negative or if the result of (len(b) * count) // overflows. func Repeat(b []byte, count int) []byte { if count == 0 { return []byte{} } // Since we cannot return an error on overflow, // we should panic if the repeat will generate an overflow. // See golang.org/issue/16237. if count < 0 {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Feb 19 19:51:15 GMT 2024 - 33.8K bytes - Viewed (0) -
src/bytes/buffer_test.go
switch err := recover().(type) { case nil: t.Fatal("bytes.Buffer.ReadFrom didn't panic") case error: // this is the error string of errNegativeRead wantError := "bytes.Buffer: reader returned negative count from Read" if err.Error() != wantError { t.Fatalf("recovered panic: got %v, want %v", err.Error(), wantError) } default: t.Fatalf("unexpected panic value: %#v", err) } }()
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Apr 26 13:31:36 GMT 2024 - 18.6K bytes - Viewed (0) -
src/cmd/asm/internal/asm/parse.go
if p.arch.Family == sys.ARM64 { if x >= 64 { p.errorf("register shift count too large: %s", str) } count = int16((x & 63) << 10) } else { if x >= 32 { p.errorf("register shift count too large: %s", str) } count = int16((x & 31) << 7) } default: p.errorf("unexpected %s in register shift", tok.String()) } if p.arch.Family == sys.ARM64 {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Feb 21 14:34:57 GMT 2024 - 36.9K bytes - Viewed (0) -
src/bytes/reader.go
r.prevRune = -1 if r.i >= int64(len(r.s)) { return 0, nil } b := r.s[r.i:] m, err := w.Write(b) if m > len(b) { panic("bytes.Reader.WriteTo: invalid Write count") } r.i += int64(m) n = int64(m) if m != len(b) && err == nil { err = io.ErrShortWrite } return } // Reset resets the [Reader.Reader] to be reading from b.
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Oct 13 17:10:31 GMT 2023 - 3.9K bytes - Viewed (0) -
src/bufio/bufio_test.go
b := NewReader(new(negativeReader)) defer func() { switch err := recover().(type) { case nil: t.Fatal("read did not panic") case error: if !strings.Contains(err.Error(), "reader returned negative count from Read") { t.Fatalf("wrong panic: %v", err) } default: t.Fatalf("unexpected panic value: %T(%v)", err, err) } }() b.Read(make([]byte, 100)) }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Feb 10 18:56:01 GMT 2023 - 51.5K bytes - Viewed (0) -
src/archive/zip/reader_test.go
if zt.File == nil { return } if z.Comment != zt.Comment { t.Errorf("comment=%q, want %q", z.Comment, zt.Comment) } if len(z.File) != len(zt.File) { t.Fatalf("file count=%d, want %d", len(z.File), len(zt.File)) } // test read of each file for i, ft := range zt.File { readTestFile(t, zt, ft, z.File[i], raw) } if t.Failed() { return }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Mar 27 18:23:49 GMT 2024 - 55.3K bytes - Viewed (0) -
doc/go1.17_spec.html
The shift operators shift the left operand by the shift count specified by the right operand, which must be non-negative. If the shift count is negative at run time, a <a href="#Run_time_panics">run-time panic</a> occurs. The shift operators implement arithmetic shifts if the left operand is a signed integer and logical shifts if it is an unsigned integer. There is no upper limit on the shift count. Shifts behave
HTML - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Apr 11 20:22:45 GMT 2024 - 211.6K bytes - Viewed (0) -
src/cmd/asm/internal/lex/input.go
for argNum := 0; ; argNum++ { tokens, tok := in.collectArgument(macro) args = append(args, tokens) if tok == ')' { break } } // Zero-argument macros are tricky. if len(macro.args) == 0 && len(args) == 1 && args[0] == nil { args = nil } else if len(args) != len(macro.args) { in.Error("wrong arg count for macro", macro.name) }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Tue Aug 29 07:48:38 GMT 2023 - 12.6K bytes - Viewed (0) -
src/archive/zip/zip_test.go
var rp *repeatedByte if len(r.buf) > 0 { rp = &r.buf[len(r.buf)-1] // Fast path, if p is entirely the same byte repeated. if lastByte := rp.b; len(p) > 0 && p[0] == lastByte { if bytes.Count(p, []byte{lastByte}) == len(p) { rp.n += int64(len(p)) return len(p), nil } } } for _, b := range p { if rp == nil || rp.b != b {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Mar 27 18:23:49 GMT 2024 - 19.5K bytes - Viewed (0) -
api/go1.13.txt
pkg syscall (netbsd-arm64-cgo), const SYS_MODCTL = 246 pkg syscall (netbsd-arm64-cgo), const SYS_MODCTL ideal-int pkg syscall (netbsd-arm64-cgo), const SYS_MOUNT = 410 pkg syscall (netbsd-arm64-cgo), const SYS_MOUNT ideal-int pkg syscall (netbsd-arm64-cgo), const SYS_MPROTECT = 74 pkg syscall (netbsd-arm64-cgo), const SYS_MPROTECT ideal-int pkg syscall (netbsd-arm64-cgo), const SYS_MREMAP = 411
Plain Text - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Aug 08 18:44:16 GMT 2019 - 452.6K bytes - Viewed (0)