mirror of
https://github.com/pgsty/minio.git
synced 2026-03-16 01:26:03 +01:00
Start using error wrapping with fmt.Errorf (#8588)
Use fatih/errwrap to fix all the code to use error wrapping with fmt.Errorf()
This commit is contained in:
@@ -124,7 +124,7 @@ type diskCache struct {
|
||||
// Inits the disk cache dir if it is not initialized already.
|
||||
func newDiskCache(dir string, expiry int, quotaPct int) (*diskCache, error) {
|
||||
if err := os.MkdirAll(dir, 0777); err != nil {
|
||||
return nil, fmt.Errorf("Unable to initialize '%s' dir, %s", dir, err)
|
||||
return nil, fmt.Errorf("Unable to initialize '%s' dir, %w", dir, err)
|
||||
}
|
||||
cache := diskCache{
|
||||
dir: dir,
|
||||
|
||||
Reference in New Issue
Block a user