From a77b90c35e2ff95fa58aff1cd450db3ccbff36a6 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 17 May 2022 16:55:07 +0200 Subject: [PATCH] volume/local: make setOpts() a method of localVolume Signed-off-by: Sebastiaan van Stijn --- volume/local/local.go | 2 +- volume/local/local_unix.go | 2 +- volume/local/local_windows.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/volume/local/local.go b/volume/local/local.go index 4783d4b858..2fabc4f48a 100644 --- a/volume/local/local.go +++ b/volume/local/local.go @@ -173,7 +173,7 @@ func (r *Root) Create(name string, opts map[string]string) (volume.Volume, error } if len(opts) != 0 { - if err = setOpts(v, opts); err != nil { + if err = v.setOpts(opts); err != nil { return nil, err } var b []byte diff --git a/volume/local/local_unix.go b/volume/local/local_unix.go index fc507dc26f..1ead9b26b8 100644 --- a/volume/local/local_unix.go +++ b/volume/local/local_unix.go @@ -47,7 +47,7 @@ func (o *optsConfig) String() string { return fmt.Sprintf("type='%s' device='%s' o='%s' size='%d'", o.MountType, o.MountDevice, o.MountOpts, o.Quota.Size) } -func setOpts(v *localVolume, opts map[string]string) error { +func (v *localVolume) setOpts(opts map[string]string) error { if len(opts) == 0 { return nil } diff --git a/volume/local/local_windows.go b/volume/local/local_windows.go index 13847228a5..abf41a980d 100644 --- a/volume/local/local_windows.go +++ b/volume/local/local_windows.go @@ -14,7 +14,7 @@ import ( type optsConfig struct{} -func setOpts(v *localVolume, opts map[string]string) error { +func (v *localVolume) setOpts(opts map[string]string) error { if len(opts) > 0 { return errdefs.InvalidParameter(errors.New("options are not supported on this platform")) }