mirror of
https://github.com/minio/minio.git
synced 2024-12-25 06:35:56 -05:00
chore: use errors.New to replace fmt.Errorf with no parameters (#19568)
Signed-off-by: ChengenH <hce19970702@gmail.com>
This commit is contained in:
parent
519dbfebf6
commit
f5e3eedf34
@ -63,8 +63,8 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
errHealIdleTimeout = fmt.Errorf("healing results were not consumed for too long")
|
errHealIdleTimeout = errors.New("healing results were not consumed for too long")
|
||||||
errHealStopSignalled = fmt.Errorf("heal stop signaled")
|
errHealStopSignalled = errors.New("heal stop signaled")
|
||||||
|
|
||||||
errFnHealFromAPIErr = func(ctx context.Context, err error) error {
|
errFnHealFromAPIErr = func(ctx context.Context, err error) error {
|
||||||
apiErr := toAdminAPIErr(ctx, err)
|
apiErr := toAdminAPIErr(ctx, err)
|
||||||
|
@ -197,7 +197,7 @@ func (h *HTTPRangeSpec) ToHeader() (string, error) {
|
|||||||
case h.Start > -1:
|
case h.Start > -1:
|
||||||
end = ""
|
end = ""
|
||||||
default:
|
default:
|
||||||
return "", fmt.Errorf("does not have valid range value")
|
return "", errors.New("does not have valid range value")
|
||||||
}
|
}
|
||||||
return fmt.Sprintf("bytes=%s-%s", start, end), nil
|
return fmt.Sprintf("bytes=%s-%s", start, end), nil
|
||||||
}
|
}
|
||||||
|
@ -558,7 +558,7 @@ func loadTierConfig(ctx context.Context, objAPI ObjectLayer) (*TierConfigMgr, er
|
|||||||
}
|
}
|
||||||
|
|
||||||
if len(data) <= 4 {
|
if len(data) <= 4 {
|
||||||
return nil, fmt.Errorf("tierConfigInit: no data")
|
return nil, errors.New("tierConfigInit: no data")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read header
|
// Read header
|
||||||
|
Loading…
Reference in New Issue
Block a user