mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-08 14:34:49 +09:00
Remove dead code identified by deadcode tool (#37271)
Ran [`deadcode`](https://pkg.go.dev/golang.org/x/tools/cmd/deadcode) (`-test ./...`) to find functions, methods and error types unreachable from any call path (including tests), and removed the truly-dead ones. Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
This commit is contained in:
@@ -50,12 +50,6 @@ func (err ErrUserSettingIsNotExist) Unwrap() error {
|
||||
return util.ErrNotExist
|
||||
}
|
||||
|
||||
// IsErrUserSettingIsNotExist return true if err is ErrSettingIsNotExist
|
||||
func IsErrUserSettingIsNotExist(err error) bool {
|
||||
_, ok := err.(ErrUserSettingIsNotExist)
|
||||
return ok
|
||||
}
|
||||
|
||||
// genSettingCacheKey returns the cache key for some configuration
|
||||
func genSettingCacheKey(userID int64, key string) string {
|
||||
return fmt.Sprintf("user_%d.setting.%s", userID, key)
|
||||
|
||||
Reference in New Issue
Block a user