From 856ea30556cfdc01ba3545de087e735413245210 Mon Sep 17 00:00:00 2001 From: Brandon Lum Date: Wed, 13 Nov 2019 20:32:55 -0500 Subject: [PATCH] Add client unpack opts Signed-off-by: Brandon Lum --- client_opts.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/client_opts.go b/client_opts.go index 6f485c18d..860461efa 100644 --- a/client_opts.go +++ b/client_opts.go @@ -130,6 +130,14 @@ func WithPullUnpack(_ *Client, c *RemoteContext) error { return nil } +// WithUnpackOpts is used to add unpack options to the unpacker. +func WithUnpackOpts(opts []UnpackOpt) RemoteOpt { + return func(_ *Client, c *RemoteContext) error { + c.UnpackOpts = append(c.UnpackOpts, opts...) + return nil + } +} + // WithPullSnapshotter specifies snapshotter name used for unpacking func WithPullSnapshotter(snapshotterName string) RemoteOpt { return func(_ *Client, c *RemoteContext) error {