mirror of
https://github.com/pgsty/minio.git
synced 2026-07-23 06:00:24 +03:00
Fix govet+staticcheck issues (#20263)
This is better: https://github.com/golang/go/issues/60529
This commit is contained in:
@@ -58,9 +58,20 @@ func (u Err) Error() string {
|
||||
}
|
||||
|
||||
// Msg - Replace the current error's message
|
||||
func (u Err) Msg(m string, args ...interface{}) Err {
|
||||
func (u Err) Msg(m string) Err {
|
||||
e := u.Clone()
|
||||
e.msg = fmt.Sprintf(m, args...)
|
||||
e.msg = m
|
||||
return e
|
||||
}
|
||||
|
||||
// Msgf - Replace the current error's message
|
||||
func (u Err) Msgf(m string, args ...interface{}) Err {
|
||||
e := u.Clone()
|
||||
if len(args) == 0 {
|
||||
e.msg = m
|
||||
} else {
|
||||
e.msg = fmt.Sprintf(m, args...)
|
||||
}
|
||||
return e
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user