mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-02-23 03:45:47 -05:00
chore: Remove ErrInvalidConfiguration
- Introduced in6b1266b6b3
and removed in6f9c278559
.
This commit is contained in:
parent
c4b2352c6c
commit
56c757561f
2 changed files with 0 additions and 23 deletions
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue