- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 99 for panic (0.02 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
internal/event/targetlist_test.go
panic(err) } targetListCase3 := NewTargetList(t.Context()) if err := targetListCase3.Add(&ExampleTarget{TargetID{"3", "testcase"}, false, false}); err != nil { panic(err) } if err := targetListCase3.Add(&ExampleTarget{TargetID{"1", "webhook"}, false, false}); err != nil { panic(err) } testCases := []struct { targetList *TargetList
Created: 2026-04-05 19:28 - Last Modified: 2025-04-09 14:28 - 6K bytes - Click Count (0) -
internal/lsync/lrwmutex_test.go
ctx := t.Context() lrwm := NewLRWMutex() if !lrwm.GetRLock(ctx, "", "object1", time.Second) { panic("Failed to acquire read lock") } // fmt.Println("1st read lock acquired, waiting...") if !lrwm.GetRLock(ctx, "", "object1", time.Second) { panic("Failed to acquire read lock") } // fmt.Println("2nd read lock acquired, waiting...") go func() { time.Sleep(2 * time.Second)
Created: 2026-04-05 19:28 - Last Modified: 2025-09-28 20:59 - 7.8K bytes - Click Count (0) -
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
Created: 2026-04-07 11:13 - Last Modified: 2025-11-14 19:01 - 16.5K bytes - Click Count (0) -
cmd/metrics-v3-types.go
panic("labels must be a list of ordered key-value pairs") } validLabels := desc.getLabelSet() labelMap := make(map[string]string, len(labels)/2) for i := 0; i < len(labels); i += 2 { if _, ok := validLabels[labels[i]]; !ok { panic(fmt.Sprintf("invalid label: %s (metric: %s)", labels[i], name)) } labelMap[labels[i]] = labels[i+1] } if len(labels)/2 != len(validLabels) {Created: 2026-04-05 19:28 - Last Modified: 2025-02-28 19:33 - 15.6K bytes - Click Count (0) -
internal/logger/console.go
} logJSON, err := json.Marshal(&log.Entry{ Level: FatalKind, Message: message, Time: time.Now().UTC(), Trace: &log.Trace{Message: message, Source: []string{getSource(6)}}, }) if err != nil { panic(err) } fmt.Fprintln(Output, string(logJSON)) ExitFunc(1) } func (f fatalMsg) quiet(msg string, args ...any) { f.pretty(msg, args...) } var ( logTag = "FATAL"
Created: 2026-04-05 19:28 - Last Modified: 2025-08-29 02:39 - 7.2K bytes - Click Count (0) -
src/builtin/builtin.go
func close(c chan<- Type) // The panic built-in function stops normal execution of the current // goroutine. When a function F calls panic, normal execution of F stops // immediately. Any functions whose execution was deferred by F are run in // the usual way, and then F returns to its caller. To the caller G, the // invocation of F then behaves like a call to panic, terminating G's
Created: 2026-04-07 11:13 - Last Modified: 2026-02-26 17:14 - 13.2K bytes - Click Count (0) -
src/bufio/export_test.go
// Exported for testing only. import ( "unicode/utf8" ) var IsSpace = isSpace const DefaultBufSize = defaultBufSize func (s *Scanner) MaxTokenSize(n int) { if n < utf8.UTFMax || n > 1e9 { panic("bad max token size") } if n < len(s.buf) { s.buf = make([]byte, n) } s.maxTokenSize = n } // ErrOrEOF is like Err, but returns EOF. Used to test a corner case. func (s *Scanner) ErrOrEOF() error {
Created: 2026-04-07 11:13 - Last Modified: 2017-11-02 17:17 - 597 bytes - Click Count (0) -
internal/s3select/jstream/scanner.go
Created: 2026-04-05 19:28 - Last Modified: 2024-09-23 19:35 - 2.5K bytes - Click Count (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 BufferCreated: 2026-04-07 11:13 - Last Modified: 2025-11-14 19:01 - 19.4K bytes - Click Count (0) -
src/archive/zip/register.go
if _, dup := decompressors.LoadOrStore(method, dcomp); dup { panic("decompressor already registered") } } // RegisterCompressor registers custom compressors for a specified method ID. // The common methods [Store] and [Deflate] are built in. func RegisterCompressor(method uint16, comp Compressor) { if _, dup := compressors.LoadOrStore(method, comp); dup { panic("compressor already registered") } }
Created: 2026-04-07 11:13 - Last Modified: 2023-10-13 18:36 - 3.7K bytes - Click Count (0)