1
0
mirror of https://github.com/rclone/rclone.git synced 2026-01-08 19:43:58 +00:00

rc: convert options to new style

This commit is contained in:
Nick Craig-Wood
2024-07-04 10:47:05 +01:00
parent cf25ae69ad
commit ce1859cd82
11 changed files with 113 additions and 70 deletions

View File

@@ -16,7 +16,7 @@ import (
"github.com/rclone/rclone/fs"
"github.com/rclone/rclone/fs/config"
"github.com/rclone/rclone/fs/rc/rcflags"
"github.com/rclone/rclone/fs/rc"
)
// PackageJSON is the structure of package.json of a plugin
@@ -83,7 +83,7 @@ func newPlugins(fileName string) *Plugins {
}
func initPluginsOrError() error {
if !rcflags.Opt.WebUI {
if !rc.Opt.WebUI {
return errors.New("WebUI needs to be enabled for plugins to work")
}
initMutex.Lock()

View File

@@ -7,7 +7,6 @@ import (
"testing"
"github.com/rclone/rclone/fs/rc"
"github.com/rclone/rclone/fs/rc/rcflags"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
@@ -18,7 +17,7 @@ const testPluginKey = testPluginAuthor + "/" + testPluginName
const testPluginURL = "https://github.com/" + testPluginAuthor + "/" + testPluginName + "/"
func init() {
rcflags.Opt.WebUI = true
rc.Opt.WebUI = true
}
func setCacheDir(t *testing.T) {