// NotFound sets the specified function as the not-found handler (when no route matches) and returns the router.
// Note that only the root router can have a NotFound handler.
773565
func (r *Router) NotFound(fn interface{}) *Router {
	if r.parent != nil {
		panic("You can only set a NotFoundHandler on the root router.")
	}
	vfn := reflect.ValueOf(fn)
	validateNotFoundHandler(vfn, r.contextType)
	r.notFoundHandler = vfn
	return r
}
586021
func IsNotFound(err error) bool {
	if err == nil {
		return false
	}
	if err, ok := err.(*ErrorResponse); ok && err.Response.StatusCode == http.StatusNotFound {
		return true
	}
	return false
}
1260041
func (exp *explorerUI) NotFound(w http.ResponseWriter, r *http.Request) {
	exp.StatusPage(w, "Page not found.", "Cannot find page: "+r.URL.Path, "", ExpStatusNotFound)
}
1147883
func ExpectNotFound(c *check.C, err error) {
	c.Assert(trace.IsNotFound(err), check.Equals, true, check.Commentf("expected NotFound, got %T %v at %v", trace.Unwrap(err), err, string(debug.Stack())))
}
1329248
func (r *Router) PatchFunc(pattern string, fn http.HandlerFunc) Route {
	return r.Patch(pattern, http.HandlerFunc(fn))
}
204195
func (builder *FetchValueCommandBuilder) WithNotFoundOk(notFoundOk bool) *FetchValueCommandBuilder {
	builder.protobuf.NotfoundOk = &notFoundOk
	return builder
}
696040
func NotFound(w http.ResponseWriter, r *http.Request) {
	http.Error(w, "Umm... have you tried turning it off and on again?", 404)
}
1102607
func NotFound(message string, args ...interface{}) Error {
	if message == "" {
		message = "Not found"
	}
	return New(http.StatusNotFound, fmt.Sprintf(message, args...))
}
1140695
func (s *Selection) NotFunction(f func(int, *Selection) bool) *Selection {
	return pushStack(s, winnowFunction(s, f, false))
}
203540
func (s *Server) handleNotFound(w http.ResponseWriter, r *http.Request) {
	url := r.URL.String()
	w.Header().Add("Content-Type", "text/html")
	if url == "/" {
		var urls []string
		for _, path := range s.httpEndpoints {
			urls = append(urls, path)
		}
		sort.Strings(urls)
		IndexTemplate.Execute(w, customhttp.DirectoryListing{"/", urls})
	} else {
		w.WriteHeader(404)
		ErrorTemplate.Execute(w, "File Not Found (404) "+url)
	}
}
753242
func IsNotFound(data string) bool {
	notExistsKeys := []string{
		"no found",
		"no match",
		"not found",
		"not match",
		"no entries found",
		"no data found",
		"not registered",
		"not been registered",
		"is free",
		"not available for registration",
		"object does not exist",
	}

	data = strings.ToLower(data)
	for _, v := range notExistsKeys {
		if strings.Contains(data, v) {
			return true
		}
	}

	return false
}
1100272
func IsNotFound(err error) bool {
	kerr, ok := err.(*KeyError)
	return ok && kerr.Err == errNotFound
}
378457
func (r *Router) Lookup(method string, path string) (httprouter.Handle, httprouter.Params, bool) {
	return r.Router.Lookup(method, path)
}
527613
func NewNotFound(kind, name string) error {
	return &StatusError{unversioned.Status{
		Status: unversioned.StatusFailure,
		Code:   http.StatusNotFound,
		Reason: unversioned.StatusReasonNotFound,
		Details: &unversioned.StatusDetails{
			Kind: kind,
			Name: name,
		},
		Message: fmt.Sprintf("%s %q not found", kind, name),
	}}
}
923303
func (s *DB) RecordNotFound() bool {
	for _, err := range s.GetErrors() {
		if err == ErrRecordNotFound {
			return true
		}
	}
	return false
}
1348815
func (builder *FetchSetCommandBuilder) WithNotFoundOk(notFoundOk bool) *FetchSetCommandBuilder {
	builder.protobuf.NotfoundOk = &notFoundOk
	return builder
}
1119503
func maybeNotFound(err *params.Error) error {
	if err == nil || !params.IsCodeNotFound(err) {
		return err
	}
	return errors.NewNotFound(err, "")
}