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:
@@ -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()
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user