Replace interface{}
with any
(#25686)
Result of running `perl -p -i -e 's#interface\{\}#any#g' **/*` and `make fmt`.
Basically the same [as golang did](2580d0e08d
).
This commit is contained in:
parent
00dbba7f42
commit
88f835192d
233 changed files with 727 additions and 727 deletions
|
@ -37,7 +37,7 @@ func (w SilentWrap) Unwrap() error {
|
|||
}
|
||||
|
||||
// NewSilentWrapErrorf returns an error that formats as the given text but unwraps as the provided error
|
||||
func NewSilentWrapErrorf(unwrap error, message string, args ...interface{}) error {
|
||||
func NewSilentWrapErrorf(unwrap error, message string, args ...any) error {
|
||||
if len(args) == 0 {
|
||||
return SilentWrap{Message: message, Err: unwrap}
|
||||
}
|
||||
|
@ -45,21 +45,21 @@ func NewSilentWrapErrorf(unwrap error, message string, args ...interface{}) erro
|
|||
}
|
||||
|
||||
// NewInvalidArgumentErrorf returns an error that formats as the given text but unwraps as an ErrInvalidArgument
|
||||
func NewInvalidArgumentErrorf(message string, args ...interface{}) error {
|
||||
func NewInvalidArgumentErrorf(message string, args ...any) error {
|
||||
return NewSilentWrapErrorf(ErrInvalidArgument, message, args...)
|
||||
}
|
||||
|
||||
// NewPermissionDeniedErrorf returns an error that formats as the given text but unwraps as an ErrPermissionDenied
|
||||
func NewPermissionDeniedErrorf(message string, args ...interface{}) error {
|
||||
func NewPermissionDeniedErrorf(message string, args ...any) error {
|
||||
return NewSilentWrapErrorf(ErrPermissionDenied, message, args...)
|
||||
}
|
||||
|
||||
// NewAlreadyExistErrorf returns an error that formats as the given text but unwraps as an ErrAlreadyExist
|
||||
func NewAlreadyExistErrorf(message string, args ...interface{}) error {
|
||||
func NewAlreadyExistErrorf(message string, args ...any) error {
|
||||
return NewSilentWrapErrorf(ErrAlreadyExist, message, args...)
|
||||
}
|
||||
|
||||
// NewNotExistErrorf returns an error that formats as the given text but unwraps as an ErrNotExist
|
||||
func NewNotExistErrorf(message string, args ...interface{}) error {
|
||||
func NewNotExistErrorf(message string, args ...any) error {
|
||||
return NewSilentWrapErrorf(ErrNotExist, message, args...)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue