- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 18 for panic (0.17 sec)
-
src/bytes/buffer.go
// another n bytes. After Grow(n), at least n bytes can be written to the // buffer without another allocation. // If n is negative, Grow will panic. // If the buffer can't grow it will panic with [ErrTooLarge]. func (b *Buffer) Grow(n int) { if n < 0 { panic("bytes.Buffer.Grow: negative count") } m := b.grow(n) b.buf = b.buf[:m] } // Write appends the contents of p to the buffer, growing the buffer as
Registered: Tue Dec 30 11:13:12 UTC 2025 - Last Modified: Fri Nov 14 19:01:17 UTC 2025 - 16.5K bytes - Viewed (0) -
src/bytes/buffer_test.go
} } type panicReader struct{ panic bool } func (r panicReader) Read(p []byte) (int, error) { if r.panic { panic("oops") } return 0, io.EOF } // Make sure that an empty Buffer remains empty when // it is "grown" before a Read that panics func TestReadFromPanicReader(t *testing.T) { // First verify non-panic behaviour var buf BufferRegistered: Tue Dec 30 11:13:12 UTC 2025 - Last Modified: Fri Nov 14 19:01:17 UTC 2025 - 19.4K bytes - Viewed (0) -
tests/serializer_test.go
t.Fatalf("failed to query data, got error %v", err) } AssertEqual(t, result.Roles, data.Roles) AssertEqual(t, result.JobInfo.Location, data.JobInfo.Location) } // Test for: panic when serializer field with any type is nil func TestSerializerWithAnyType(t *testing.T) { type ProductWithAny struct { gorm.Model Name string Data any `gorm:"serializer:json"` }
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Sat Nov 22 03:14:36 UTC 2025 - 9.3K bytes - Viewed (0) -
doc/godebug.md
The [GODEBUG History](#history) gives the exact defaults for each Go toolchain version. For example, Go 1.21 introduces the `panicnil` setting, controlling whether `panic(nil)` is allowed; it defaults to `panicnil=0`, making `panic(nil)` a run-time error. Using `panicnil=1` restores the behavior of Go 1.20 and earlier. When compiling a work module or workspace that declares
Registered: Tue Dec 30 11:13:12 UTC 2025 - Last Modified: Wed Dec 03 00:18:09 UTC 2025 - 24.7K bytes - Viewed (0) -
doc/go_spec.html
condition is reported, including the value of the argument to <code>panic</code>. This termination sequence is called <i>panicking</i>. </p> <pre> panic(42) panic("unreachable") panic(Error("cannot parse")) </pre> <p> The <code>recover</code> function allows a program to manage behavior of a panicking goroutine. Suppose a function <code>G</code> defers a function <code>D</code> that calls
Registered: Tue Dec 30 11:13:12 UTC 2025 - Last Modified: Tue Dec 02 23:07:19 UTC 2025 - 286.5K bytes - Viewed (1) -
src/cmd/asm/internal/asm/parse.go
pkgPrefix: pkgPrefix, } } // panicOnError is enabled when testing to abort execution on the first error // and turn it into a recoverable panic. var panicOnError bool func (p *Parser) errorf(format string, args ...any) { if panicOnError { panic(fmt.Errorf(format, args...)) } if p.lineNum == p.errorLine { // Only one error per line. return } p.errorLine = p.lineNum if p.lex != nil {
Registered: Tue Dec 30 11:13:12 UTC 2025 - Last Modified: Wed Nov 12 03:59:40 UTC 2025 - 37.3K bytes - Viewed (0) -
src/cmd/asm/internal/lex/input.go
name: name, args: nil, tokens: Tokenize(value), } } return macros } var panicOnError bool // For testing. func (in *Input) Error(args ...any) { if panicOnError { panic(fmt.Errorf("%s:%d: %s", in.File(), in.Line(), fmt.Sprintln(args...))) } fmt.Fprintf(os.Stderr, "%s:%d: %s", in.File(), in.Line(), fmt.Sprintln(args...)) os.Exit(1) }
Registered: Tue Dec 30 11:13:12 UTC 2025 - Last Modified: Wed Nov 12 03:59:40 UTC 2025 - 12.4K bytes - Viewed (0) -
lib/fips140/v1.1.0-rc1.zip
fips140.RecordNonApproved() if len(src) < BlockSize { panic("crypto/aes: input not full block") } if len(dst) < BlockSize { panic("crypto/aes: output not full block") } if alias.InexactOverlap(dst[:BlockSize], src[:BlockSize]) { panic("crypto/aes: invalid buffer overlap") } encryptBlock(c, dst, src) } func (c *Block) Decrypt(dst, src []byte) { // AES-ECB is not approved in FIPS 140-3 mode. fips140.RecordNonApproved() if len(src) < BlockSize { panic("crypto/aes: input not full block") } if len(dst) <...
Registered: Tue Dec 30 11:13:12 UTC 2025 - Last Modified: Thu Dec 11 16:27:41 UTC 2025 - 663K bytes - Viewed (0) -
CHANGELOG/CHANGELOG-1.35.md
- Added validation to ensure `log-flush-frequency` is a positive value, returning an error instead of causing a panic. ([#133540](https://github.com/kubernetes/kubernetes/pull/133540), [@BenTheElder](https://github.com/BenTheElder)) [SIG Architecture, Instrumentation, Network and Node]
Registered: Fri Dec 26 09:05:12 UTC 2025 - Last Modified: Wed Dec 17 13:01:55 UTC 2025 - 228.5K bytes - Viewed (0) -
CHANGELOG/CHANGELOG-1.33.md
- Kube-apiserver: fix a possible panic validating a custom resource whose CustomResourceDefinition indicates a status subresource exists, but which does not define a `status` property in the `openAPIV3Schema` ([#135362](https://github.com/kubernetes/kubernetes/pull/135362), [@fusida](h...
Registered: Fri Dec 26 09:05:12 UTC 2025 - Last Modified: Wed Dec 10 01:15:24 UTC 2025 - 334.8K bytes - Viewed (0)