"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
fs: Make Option.GetValue() public #2541
Nick Craig-Wood1557287c64f4
diff --git a/fs/fs.go b/fs/fs.goindex 390d9364a..ec6d1e267 100644--- a/fs/fs.go+++ b/fs/fs.go@@ -125,8 +125,8 @@ type Option struct {Advanced bool // set if this is an advanced config option}-// Gets the current current value which is the default if not set-func (o *Option) value() interface{} {+// GetValue gets the current current value which is the default if not set+func (o *Option) GetValue() interface{} {val := o.Valueif val == nil {val = o.Default@@ -136,12 +136,12 @@ func (o *Option) value() interface{} {// String turns Option into a stringfunc (o *Option) String() string {- return fmt.Sprint(o.value())+ return fmt.Sprint(o.GetValue())}// Set a Option from a stringfunc (o *Option) Set(s string) (err error) {- newValue, err := configstruct.StringToInterface(o.value(), s)+ newValue, err := configstruct.StringToInterface(o.GetValue(), s)if err != nil {return err}@@ -151,7 +151,7 @@ func (o *Option) Set(s string) (err error) {// Type of the valuefunc (o *Option) Type() string {- return reflect.TypeOf(o.value()).Name()+ return reflect.TypeOf(o.GetValue()).Name()}// FlagName for the option