mirror of
https://github.com/rclone/rclone.git
synced 2025-08-18 09:30:03 +02:00
serve: make the servers self registering
This is so that they can import cmd/serve without causing an import loop. The active servers can now be configured by commenting lines out in cmd/all/all.go like all the other commands.
This commit is contained in:
@@ -14,6 +14,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/rclone/rclone/cmd"
|
||||
"github.com/rclone/rclone/cmd/serve"
|
||||
"github.com/rclone/rclone/fs"
|
||||
"github.com/rclone/rclone/fs/config/flags"
|
||||
"github.com/rclone/rclone/vfs"
|
||||
@@ -83,6 +84,7 @@ func AddFlags(flagSet *pflag.FlagSet) {
|
||||
func init() {
|
||||
vfsflags.AddFlags(Command.Flags())
|
||||
AddFlags(Command.Flags())
|
||||
serve.Command.AddCommand(Command)
|
||||
}
|
||||
|
||||
// Run the command
|
||||
|
Reference in New Issue
Block a user