MCPcopy Create free account
hub / github.com/gogs/gogs / IsNotFound

Function IsNotFound

internal/errutil/errutil.go:9–12  ·  view source on GitHub ↗

IsNotFound returns true if the error is a not found error.

(err error)

Source from the content-addressed store, hash-verified

7
8// IsNotFound returns true if the error is a not found error.
9func IsNotFound(err error) bool {
10 e, ok := err.(NotFound)
11 return ok && e.NotFound()
12}
13
14// Args is a map of key-value pairs to provide additional context of an error.
15type Args map[string]any

Callers 5

NotFoundOrErrorMethod · 0.92
NotFoundOrErrorMethod · 0.92
TestError_NotFoundFunction · 0.92
TestError_NotFoundFunction · 0.92
TestIsNotFoundFunction · 0.85

Calls 1

NotFoundMethod · 0.65

Tested by 3

TestError_NotFoundFunction · 0.74
TestError_NotFoundFunction · 0.74
TestIsNotFoundFunction · 0.68