- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 40 for gopanic (0.13 sec)
-
internal/dsync/drwmutex_test.go
t.Fatalf("unlock of unlocked RWMutex did not panic") } }() mu := NewDRWMutex(ds, "test") mu.Unlock(context.Background()) } // Borrowed from rwmutex_test.go func TestUnlockPanic2(t *testing.T) { mu := NewDRWMutex(ds, "test-unlock-panic-2") defer func() { if recover() == nil { t.Fatalf("unlock of unlocked RWMutex did not panic") }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Dec 24 03:49:07 UTC 2022 - 9.7K bytes - Viewed (0) -
internal/event/targetlist_test.go
panic(err) } targetListCase3 := NewTargetList(context.Background()) 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 {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Dec 05 10:16:33 UTC 2023 - 6.1K bytes - Viewed (0) -
internal/lsync/lrwmutex_test.go
ctx := context.Background() 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)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Mar 05 04:57:35 UTC 2023 - 7.9K bytes - Viewed (0) -
internal/bpool/bpool.go
// byte arrays sized based on width. func NewBytePoolCap(maxSize uint64, width int, capwidth int) (bp *BytePoolCap) { if capwidth <= 0 { panic("total buffer capacity must be provided") } if capwidth < 64 { panic("buffer capped with smaller than 64 bytes is not supported") } if width > capwidth { panic("minimum buffer length cannot be > capacity of the buffer") } return &BytePoolCap{ c: make(chan []byte, maxSize),
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 29 01:40:52 UTC 2024 - 3K bytes - Viewed (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 ...interface{}) { f.pretty(msg, args...) } var ( logTag = "FATAL"
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jul 12 20:51:54 UTC 2024 - 7.5K bytes - Viewed (0) -
internal/dsync/utils.go
package dsync import ( "math/rand" "time" ) func backoffWait(min, unit, cap time.Duration) func(*rand.Rand, uint) time.Duration { if unit > time.Hour { // Protect against integer overflow panic("unit cannot exceed one hour") } return func(r *rand.Rand, attempt uint) time.Duration { sleep := min sleep += unit * time.Duration(attempt) if sleep > cap { sleep = cap }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat May 13 15:42:21 UTC 2023 - 1.2K bytes - Viewed (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 {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Nov 02 17:17:44 UTC 2017 - 597 bytes - Viewed (0) -
internal/s3select/jstream/scanner.go
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 2.5K bytes - Viewed (0) -
internal/grid/muxserver.go
if debugPrint { fmt.Println("Mux", m.ID, "Handler took", time.Since(start).Round(time.Millisecond)) } if r := recover(); r != nil { gridLogIf(ctx, fmt.Errorf("grid handler (%v) panic: %v", msg.Handler, r)) err := RemoteErr(fmt.Sprintf("handler panic: %v", r)) handlerErr = &err } if debugPrint { fmt.Println("muxServer: Mux", m.ID, "Returned with", handlerErr) } }()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jun 07 15:51:52 UTC 2024 - 9.7K bytes - Viewed (0) -
src/cmd/cgo/ast_go1.go
package main import ( "go/ast" "go/token" ) func (f *File) walkUnexpected(x interface{}, context astContext, visit func(*File, interface{}, astContext)) { error_(token.NoPos, "unexpected type %T in walk", x) panic("unexpected type") } func funcTypeTypeParams(n *ast.FuncType) *ast.FieldList { return nil } func typeSpecTypeParams(n *ast.TypeSpec) *ast.FieldList { return nil
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Nov 30 21:45:10 UTC 2022 - 578 bytes - Viewed (0)