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

Function runRoot

cmd/help.go:116–127  ·  view source on GitHub ↗

runRoot implements the main rclone command with no subcommands

(cmd *cobra.Command, args []string)

Source from the content-addressed store, hash-verified

114
115// runRoot implements the main rclone command with no subcommands
116func runRoot(cmd *cobra.Command, args []string) {
117 if version {
118 ShowVersion()
119 resolveExitCode(nil)
120 } else {
121 _ = cmd.Usage()
122 if len(args) > 0 {
123 _, _ = fmt.Fprintf(os.Stderr, "Command not found.\n")
124 }
125 resolveExitCode(errorCommandNotFound)
126 }
127}
128
129// setupRootCommand sets default usage, help, and error handling for
130// the root command.

Callers

nothing calls this directly

Calls 2

ShowVersionFunction · 0.85
resolveExitCodeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…