1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: Apache-2.0
10 "git.arvados.org/arvados.git/lib/cli"
11 "git.arvados.org/arvados.git/lib/cmd"
12 "git.arvados.org/arvados.git/lib/costanalyzer"
13 "git.arvados.org/arvados.git/lib/deduplicationreport"
14 "git.arvados.org/arvados.git/lib/diagnostics"
15 "git.arvados.org/arvados.git/lib/mount"
19 handler = cmd.Multi(map[string]cmd.Handler{
21 "version": cmd.Version,
22 "-version": cmd.Version,
23 "--version": cmd.Version,
33 "api_client_authorization": cli.APICall,
34 "api_client": cli.APICall,
35 "authorized_key": cli.APICall,
36 "collection": cli.APICall,
37 "container": cli.APICall,
38 "container_request": cli.APICall,
40 "keep_service": cli.APICall,
43 "user_agreement": cli.APICall,
45 "virtual_machine": cli.APICall,
46 "workflow": cli.APICall,
48 "connect-ssh": connectSSHCommand{},
49 "costanalyzer": costanalyzer.Command,
50 "deduplication-report": deduplicationreport.Command,
51 "diagnostics": diagnostics.Command{},
52 "logs": logsCommand{},
53 "mount": mount.Command,
54 "shell": shellCommand{},
55 "sudo": sudoCommand{},
59 func fixLegacyArgs(args []string) []string {
60 flags, _ := cli.LegacyFlagSet()
61 return cmd.SubcommandToFront(args, flags)
65 os.Exit(handler.RunCommand(os.Args[0], fixLegacyArgs(os.Args[1:]), os.Stdin, os.Stdout, os.Stderr))