Merge pull request #3402 from MichaelEischer/misc-fixes

Various small code cleanups
This commit is contained in:
rawtaz
2021-05-24 11:30:31 +02:00
committed by GitHub
4 changed files with 7 additions and 10 deletions

View File

@@ -16,7 +16,7 @@ type Config struct {
Container string
Prefix string
Connections uint `option:"connections" help:"set a limit for the number of concurrent connections (default: 20)"`
Connections uint `option:"connections" help:"set a limit for the number of concurrent connections (default: 5)"`
}
// NewConfig returns a new Config with the default values filled in.

View File

@@ -16,7 +16,7 @@ type Config struct {
Bucket string
Prefix string
Connections uint `option:"connections" help:"set a limit for the number of concurrent connections (default: 20)"`
Connections uint `option:"connections" help:"set a limit for the number of concurrent connections (default: 5)"`
}
// NewConfig returns a new Config with the default values filled in.

View File

@@ -35,10 +35,9 @@ func ReadAt(ctx context.Context, be Backend, h Handle, offset int64, p []byte) (
return ierr
})
if err != nil {
return 0, err
return 0, errors.Wrapf(err, "ReadFull(%v)", h)
}
debug.Log("ReadAt(%v) ReadFull returned %v bytes", h, n)
return n, errors.Wrapf(err, "ReadFull(%v)", h)
return n, nil
}