MCPcopy
hub / github.com/nats-io/nats.go / stackFatalf

Function stackFatalf

test/helper_test.go:69–84  ·  view source on GitHub ↗
(t tLogger, f string, args ...any)

Source from the content-addressed store, hash-verified

67}
68
69func stackFatalf(t tLogger, f string, args ...any) {
70 lines := make([]string, 0, 32)
71 msg := fmt.Sprintf(f, args...)
72 lines = append(lines, msg)
73
74 // Generate the Stack of callers: Skip us and verify* frames.
75 for i := 1; true; i++ {
76 _, file, line, ok := runtime.Caller(i)
77 if !ok {
78 break
79 }
80 msg := fmt.Sprintf("%d - %s:%d", i, file, line)
81 lines = append(lines, msg)
82 }
83 t.Fatalf("%s", strings.Join(lines, "\n"))
84}
85
86////////////////////////////////////////////////////////////////////////////////
87// Creating client connections

Calls 1

FatalfMethod · 0.80

Tested by

no test coverage detected