MCPcopy
hub / github.com/duke-git/lancet / ExampleXError_Values

Function ExampleXError_Values

xerror/xerror_example_test.go:112–121  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

110}
111
112func ExampleXError_Values() {
113 err := New("error").With("level", "high")
114
115 errLevel := err.Values()["level"]
116
117 fmt.Println(errLevel)
118
119 // Output:
120 // high
121}
122
123func ExampleXError_Info() {
124 cause := errors.New("error")

Callers

nothing calls this directly

Calls 3

WithMethod · 0.80
NewFunction · 0.70
ValuesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…