Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

filter: rename Opt to Options for consistency

Nick Craig-Wood25c637968850
diff --git a/backend/drive/drive_internal_test.go b/backend/drive/drive_internal_test.go
index a5cd90428..998d9ba43 100644
--- a/backend/drive/drive_internal_test.go
+++ b/backend/drive/drive_internal_test.go
@@ -566,7 +566,7 @@ func (f *Fs) InternalTestAgeQuery(t *testing.T) {
// Check set up for filtering
assert.True(t, f.Features().FilterAware)
- opt := &filter.Opt{}
+ opt := &filter.Options{}
err := opt.MaxAge.Set("1h")
assert.NoError(t, err)
flt, err := filter.NewFilter(opt)
diff --git a/fs/filter/filter.go b/fs/filter/filter.go
index ede0828ee..277623600 100644
--- a/fs/filter/filter.go
+++ b/fs/filter/filter.go
@@ -19,8 +19,8 @@ import (
// This is accessed through GetConfig and AddConfig
var globalConfig = mustNewFilter(nil)
-// Opt configures the filter
-type Opt struct {
+// Options configures the filter
+type Options struct {
DeleteExcluded bool
RulesOpt // embedded so we don't change the JSON API
ExcludeFile []string
@@ -35,7 +35,7 @@ type Opt struct {
}
// DefaultOpt is the default config for the filter
-var DefaultOpt = Opt{
+var DefaultOpt = Options{
MinAge: fs.DurationOff,
MaxAge: fs.DurationOff,
MinSize: fs.SizeSuffix(-1),
@@ -47,7 +47,7 @@ type FilesMap map[string]struct{}
// Filter describes any filtering in operation
type Filter struct {
- Opt Opt
+ Opt Options
ModTimeFrom time.Time
ModTimeTo time.Time
fileRules rules
@@ -59,7 +59,7 @@ type Filter struct {
// NewFilter parses the command line options and creates a Filter
// object. If opt is nil, then DefaultOpt will be used
-func NewFilter(opt *Opt) (f *Filter, err error) {
+func NewFilter(opt *Options) (f *Filter, err error) {
f = &Filter{}
// Make a copy of the options
@@ -130,7 +130,7 @@ func NewFilter(opt *Opt) (f *Filter, err error) {
return f, nil
}
-func mustNewFilter(opt *Opt) *Filter {
+func mustNewFilter(opt *Options) *Filter {
f, err := NewFilter(opt)
if err != nil {
panic(err)