mirror of
https://github.com/rclone/rclone.git
synced 2025-08-17 17:11:37 +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:
@ -6,6 +6,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/rclone/rclone/cmd"
|
||||
"github.com/rclone/rclone/cmd/serve"
|
||||
"github.com/rclone/rclone/cmd/serve/proxy/proxyflags"
|
||||
"github.com/rclone/rclone/fs"
|
||||
"github.com/rclone/rclone/fs/config/flags"
|
||||
@ -41,6 +42,7 @@ func init() {
|
||||
flags.StringVarP(flagSet, &Opt.hashName, "etag-hash", "", Opt.hashName, "Which hash to use for the ETag, or auto or blank for off", "")
|
||||
flags.StringArrayVarP(flagSet, &Opt.authPair, "auth-key", "", Opt.authPair, "Set key pair for v4 authorization: access_key_id,secret_access_key", "")
|
||||
flags.BoolVarP(flagSet, &Opt.noCleanup, "no-cleanup", "", Opt.noCleanup, "Not to cleanup empty folder after object is deleted", "")
|
||||
serve.Command.AddCommand(Command)
|
||||
}
|
||||
|
||||
//go:embed serve_s3.md
|
||||
|
Reference in New Issue
Block a user