MCPcopy
hub / github.com/minio/minio-go / newPanicError

Function newPanicError

pkg/singleflight/singleflight.go:44–54  ·  view source on GitHub ↗
(v interface{})

Source from the content-addressed store, hash-verified

42}
43
44func newPanicError(v interface{}) error {
45 stack := debug.Stack()
46
47 // The first line of the stack trace is of the form "goroutine N [status]:"
48 // but by the time the panic reaches Do the goroutine may no longer exist
49 // and its status will have changed. Trim out the misleading line.
50 if line := bytes.IndexByte(stack, '\n'); line >= 0 {
51 stack = stack[line+1:]
52 }
53 return &panicError{value: v, stack: stack}
54}
55
56// call is an in-flight or completed singleflight.Do call
57type call[V any] struct {

Callers 1

doCallMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected