Skip to content

Commit fc167f9

Browse files
author
Jared Cordasco
committed
Correct PusherFunc helper to match Pusher intf
Signed-off-by: Jared Cordasco <[email protected]>
1 parent a7af3c1 commit fc167f9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

remotes/resolver.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ func (fn FetcherFunc) Fetch(ctx context.Context, desc ocispec.Descriptor) (io.Re
7272

7373
// PusherFunc allows package users to implement a Pusher with just a
7474
// function.
75-
type PusherFunc func(ctx context.Context, desc ocispec.Descriptor, r io.Reader) error
75+
type PusherFunc func(ctx context.Context, desc ocispec.Descriptor) (content.Writer, error)
7676

7777
// Push content
78-
func (fn PusherFunc) Push(ctx context.Context, desc ocispec.Descriptor, r io.Reader) error {
79-
return fn(ctx, desc, r)
78+
func (fn PusherFunc) Push(ctx context.Context, desc ocispec.Descriptor) (content.Writer, error) {
79+
return fn(ctx, desc)
8080
}

0 commit comments

Comments
 (0)