MCPcopy Index your code
hub / github.com/maruel/panicparse / Example_hTML

Function Example_hTML

stack/example_test.go:156–164  ·  view source on GitHub ↗

Converts a stack trace from os.Stdin into HTML on os.Stdout, discarding everything else.

()

Source from the content-addressed store, hash-verified

154// Converts a stack trace from os.Stdin into HTML on os.Stdout, discarding
155// everything else.
156func Example_hTML() {
157 s, _, err := stack.ScanSnapshot(os.Stdin, io.Discard, stack.DefaultOpts())
158 if err != nil && err != io.EOF {
159 log.Fatal(err)
160 }
161 if s != nil {
162 s.Aggregate(stack.AnyValue).ToHTML(os.Stdout, "")
163 }
164}
165
166// A sample parseStack function expects a stdlib stacktrace from runtime.Stack or debug.Stack and returns
167// the parsed stack object.

Callers

nothing calls this directly

Calls 4

ScanSnapshotFunction · 0.92
DefaultOptsFunction · 0.92
AggregateMethod · 0.80
ToHTMLMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…