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,
42 "job_task": cli.APICall,
43 "keep_disk": cli.APICall,
44 "keep_service": cli.APICall,
48 "pipeline_instance": cli.APICall,
49 "pipeline_template": cli.APICall,
50 "repository": cli.APICall,
51 "specimen": cli.APICall,
53 "user_agreement": cli.APICall,
55 "virtual_machine": cli.APICall,
56 "workflow": cli.APICall,
58 "mount": mount.Command,
59 "deduplication-report": deduplicationreport.Command,
60 "costanalyzer": costanalyzer.Command,
61 "shell": shellCommand{},
62 "connect-ssh": connectSSHCommand{},
63 "diagnostics": diagnostics.Command{},
67 func fixLegacyArgs(args []string) []string {
68 flags, _ := cli.LegacyFlagSet()
69 return cmd.SubcommandToFront(args, flags)
73 os.Exit(handler.RunCommand(os.Args[0], fixLegacyArgs(os.Args[1:]), os.Stdin, os.Stdout, os.Stderr))