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

Function ExampleXError_With

xerror/xerror_example_test.go:69–78  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

67}
68
69func ExampleXError_With() {
70 err := New("error").With("level", "high")
71
72 errLevel := err.Values()["level"]
73
74 fmt.Println(errLevel)
75
76 // Output:
77 // high
78}
79
80func ExampleXError_Id() {
81 err1 := New("error").Id("e001")

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…