// WithNotFoundOk sets notfound_ok, whether to treat notfounds as successful reads for the purposes
// of R
//
// See http://basho.com/posts/technical/riaks-config-behaviors-part-3/
190757
func (builder *FetchMapCommandBuilder) WithNotFoundOk(notFoundOk bool) *FetchMapCommandBuilder {
	builder.protobuf.NotfoundOk = &notFoundOk
	return builder
}
974815
func IsContextNotFound(err error) bool {
	if err == nil {
		return false
	}
	if _, ok := err.(*errContextNotFound); ok || err == ErrNoContext {
		return true
	}
	return strings.Contains(err.Error(), "context was not found for specified context")
}
439525
func (al HALLinks) GetOk(name string) (link *HALLink, ok bool) {
	for _, link = range al.links {
		if strings.ToLower(link.Name) == strings.ToLower(name) {
			ok = true
			return
		}
	}
	link = nil
	return
}
165873
func (app *App) NotFound(notFoundHandler func(*Context)) *App {
	app.defaultRouter.NotFound(notFoundHandler)
	return app
}
1023656
func (m *Mux) HandleNotFound(rw http.ResponseWriter, req *http.Request) {
	if m.notFound != nil {
		m.notFound.ServeHTTP(rw, req)
	} else {
		http.NotFound(rw, req)
	}
}
1267028
func NotFoundErrorf(format string, params ...interface{}) error {
	return notFound(fmt.Sprintf(format, params...))
}
974070
func NotFound(message string, args ...interface{}) error {
	return WrapWithMessage(&NotFoundError{
		Message: fmt.Sprintf(message, args...),
	}, message, args...)
}
1102607
func NotFound(message string, args ...interface{}) Error {
	if message == "" {
		message = "Not found"
	}
	return New(http.StatusNotFound, fmt.Sprintf(message, args...))
}
1324178
func IsNotFound(err error) bool {
	switch {
	case err == nil:
		return false
	case strings.Contains(err.Error(), "does not exist"):
		return true
	case strings.Contains(err.Error(), "not found"):
		return true
	default:
		return false
	}
}
1209021
func notFoundHandler(w http.ResponseWriter, r *http.Request) {
	ctx := r.Context()
	pe := &platform.Error{
		Code: platform.ENotFound,
		Msg:  "path not found",
	}

	EncodeError(ctx, pe, w)
}
923303
func (s *DB) RecordNotFound() bool {
	for _, err := range s.GetErrors() {
		if err == ErrRecordNotFound {
			return true
		}
	}
	return false
}
1100272
func IsNotFound(err error) bool {
	kerr, ok := err.(*KeyError)
	return ok && kerr.Err == errNotFound
}
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
}
1077537
func (db *baseDB) AddQueryHook(hook QueryHook) {
	db.queryHooks = append(db.queryHooks, hook)
}
170426
func (cl *CoLog) AddHook(hook Hook) {
	cl.mu.Lock()
	defer cl.mu.Unlock()

	for _, l := range hook.Levels() {
		cl.hooks[l] = append(cl.hooks[l], hook)
	}
}
504774
func (m *mux) HandleNotFound(handle MuxHandler) {
	nfh := func(rw http.ResponseWriter, req *http.Request) {
		handle(rw, req, nil)
	}
	m.router.NotFoundHandler = nfh
}
964191
func (lr *logRegistry) AddHook(hook logrus.Hook) {
	defaultLogger.Infof("adding hook %q to registry", hook)
	lr.hooks = append(lr.hooks, hook)

	lgs := lr.ListLoggers()
	for lg := range lgs {
		logger, found := lr.Lookup(lg)
		if found {
			logger.AddHook(hook)
		}
	}
}