MCPcopy Index your code
hub / github.com/rclone/rclone / AddBackendFlags

Function AddBackendFlags

cmd/cmd.go:522–533  ·  view source on GitHub ↗

AddBackendFlags creates flags for all the backend options

()

Source from the content-addressed store, hash-verified

520
521// AddBackendFlags creates flags for all the backend options
522func AddBackendFlags() {
523 backendFlags = map[string]struct{}{}
524 for _, fsInfo := range fs.Registry {
525 flags.AddFlagsFromOptions(pflag.CommandLine, fsInfo.Prefix, fsInfo.Options)
526 // Store the backend flag names for the help generator
527 for i := range fsInfo.Options {
528 opt := &fsInfo.Options[i]
529 name := opt.FlagName(fsInfo.Prefix)
530 backendFlags[name] = struct{}{}
531 }
532 }
533}
534
535// Main runs rclone interpreting flags and commands out of os.Args
536func Main() {

Callers 1

MainFunction · 0.85

Calls 2

AddFlagsFromOptionsFunction · 0.92
FlagNameMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…