chore: Remove ErrInvalidConfiguration

- Introduced in 6b1266b6b3 and removed in
6f9c278559.
This commit is contained in:
Gusted 2025-01-31 10:54:26 +01:00
parent c4b2352c6c
commit 56c757561f
No known key found for this signature in database
GPG key ID: FD821B732837125F
2 changed files with 0 additions and 23 deletions

View file

@ -201,10 +201,6 @@ code.gitea.io/gitea/modules/setting
GitConfigType.GetOption GitConfigType.GetOption
InitLoggersForTest InitLoggersForTest
code.gitea.io/gitea/modules/storage
ErrInvalidConfiguration.Error
IsErrInvalidConfiguration
code.gitea.io/gitea/modules/structs code.gitea.io/gitea/modules/structs
ParseCreateHook ParseCreateHook
ParsePushHook ParsePushHook

View file

@ -18,25 +18,6 @@ import (
// ErrURLNotSupported represents url is not supported // ErrURLNotSupported represents url is not supported
var ErrURLNotSupported = errors.New("url method not supported") var ErrURLNotSupported = errors.New("url method not supported")
// ErrInvalidConfiguration is called when there is invalid configuration for a storage
type ErrInvalidConfiguration struct {
cfg any
err error
}
func (err ErrInvalidConfiguration) Error() string {
if err.err != nil {
return fmt.Sprintf("Invalid Configuration Argument: %v: Error: %v", err.cfg, err.err)
}
return fmt.Sprintf("Invalid Configuration Argument: %v", err.cfg)
}
// IsErrInvalidConfiguration checks if an error is an ErrInvalidConfiguration
func IsErrInvalidConfiguration(err error) bool {
_, ok := err.(ErrInvalidConfiguration)
return ok
}
type Type = setting.StorageType type Type = setting.StorageType
// NewStorageFunc is a function that creates a storage // NewStorageFunc is a function that creates a storage