MCPcopy Create free account
hub / github.com/juju/errors / ExampleHide

Function ExampleHide

functions_test.go:505–515  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

503}
504
505func ExampleHide() {
506 myConstError := errors.ConstError("I don't want to be fmt printed")
507 err := fmt.Errorf("don't show this error%w", errors.Hide(myConstError))
508
509 fmt.Println(err)
510 fmt.Println(stderrors.Is(err, myConstError))
511
512 // Output:
513 // don't show this error
514 // true
515}
516
517type MyError struct {
518 Message string

Callers

nothing calls this directly

Calls 3

ConstErrorTypeAlias · 0.92
HideFunction · 0.92
IsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…