Logo
Explore Help
Register Sign In
Nemcio/Gogs
1
0
Fork 0
You've already forked Gogs
mirror of https://github.com/gogs/gogs.git synced 2026-02-07 23:19:20 +01:00
Code Issues Packages Projects Releases Wiki Activity
Files
latest-commit-build
Gogs/internal/errutil/errutil.go

16 lines
360 B
Go
Raw Permalink Normal View History

refactor: unify error handling in routing layer
2020-03-16 01:22:27 +08:00
package errutil
// NotFound represents a not found error.
type NotFound interface {
NotFound() bool
}
// IsNotFound returns true if the error is a not found error.
func IsNotFound(err error) bool {
e, ok := err.(NotFound)
return ok && e.NotFound()
}
lfs: implement HTTP routes (#6035) * Bootstrap with GORM * Fix lint error * Set conn max lifetime to one minute * Fallback to use gorm v1 * Define HTTP routes * Finish authentication * Save token updated * Add docstring * Finish authorization * serveBatch rundown * Define types in lfsutil * Finish Batch * authutil * Finish basic * Formalize response error * Fix lint errors * authutil: add tests * dbutil: add tests * lfsutil: add tests * strutil: add tests * Formalize 401 response
2020-04-04 21:14:15 +08:00
// Args is a map of key-value pairs to provide additional context of an error.
all: replace `interface{}` with `any` (#7330) Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2023-02-02 21:25:25 +08:00
type Args map[string]any
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.1 Page: 109ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API