Skip to content

Commit 8339dc7

Browse files
committed
Merge branch 'bunny'
2 parents debedd9 + 7884dcf commit 8339dc7

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

registry/storage/driver/bunny/bunny.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
storagedriver "github.com/distribution/distribution/v3/registry/storage/driver"
1313
"github.com/distribution/distribution/v3/registry/storage/driver/factory"
1414
bunny "github.com/l0wl3vel/bunny-storage-go-sdk"
15+
"github.com/sirupsen/logrus"
1516
)
1617

1718
func init() {
@@ -34,6 +35,9 @@ func (factory *bunnyDriverFactory) Create(ctx context.Context, parameters map[st
3435

3536
func New(ctx context.Context, params *DriverParameters) (storagedriver.StorageDriver, error) {
3637
client := bunny.NewClient(*params.Hostname.JoinPath(params.StorageZone), params.apiKey)
38+
logrusLogger := logrus.New()
39+
logrusLogger.SetLevel(logrus.DebugLevel)
40+
client.WithLogger(logrusLogger)
3741
return &driver{
3842
pullZone: params.Pullzone,
3943
client: client,
@@ -175,7 +179,7 @@ func (b *bunnyFileReader) Read(p []byte) (n int, err error) {
175179
}
176180
n = copy(p, data)
177181
b.offset += int64(n)
178-
if n == 0 && err == nil {
182+
if n == 0 {
179183
return 0, io.EOF
180184
}
181185
return n, nil

0 commit comments

Comments
 (0)