MCPcopy
hub / github.com/LyricTian/gin-admin / NotFound

Function NotFound

pkg/errors/errors.go:110–120  ·  view source on GitHub ↗

NotFound generates a 404 error.

(id, format string, a ...interface{})

Source from the content-addressed store, hash-verified

108
109// NotFound generates a 404 error.
110func NotFound(id, format string, a ...interface{}) error {
111 if id == "" {
112 id = DefaultNotFoundID
113 }
114 return &Error{
115 ID: id,
116 Code: http.StatusNotFound,
117 Detail: fmt.Sprintf(format, a...),
118 Status: http.StatusText(http.StatusNotFound),
119 }
120}
121
122// MethodNotAllowed generates a 405 error.
123func MethodNotAllowed(id, format string, a ...interface{}) error {

Callers 15

GetMethod · 0.92
UpdateMethod · 0.92
DeleteMethod · 0.92
GetMethod · 0.92
UpdateMethod · 0.92
DeleteMethod · 0.92
ResetPasswordMethod · 0.92
fillQueryParamMethod · 0.92
GetMethod · 0.92
CreateMethod · 0.92
UpdateMethod · 0.92
DeleteMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected