Correct PusherFunc helper to match Pusher intf

Signed-off-by: Jared Cordasco <jcordasc@coglib.com>
This commit is contained in:
Jared Cordasco 2019-04-11 23:13:20 -05:00
parent a7af3c13a5
commit fc167f9578

View File

@ -72,9 +72,9 @@ func (fn FetcherFunc) Fetch(ctx context.Context, desc ocispec.Descriptor) (io.Re
// PusherFunc allows package users to implement a Pusher with just a // PusherFunc allows package users to implement a Pusher with just a
// function. // function.
type PusherFunc func(ctx context.Context, desc ocispec.Descriptor, r io.Reader) error type PusherFunc func(ctx context.Context, desc ocispec.Descriptor) (content.Writer, error)
// Push content // Push content
func (fn PusherFunc) Push(ctx context.Context, desc ocispec.Descriptor, r io.Reader) error { func (fn PusherFunc) Push(ctx context.Context, desc ocispec.Descriptor) (content.Writer, error) {
return fn(ctx, desc, r) return fn(ctx, desc)
} }