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/mount"
16 handler = cmd.Multi(map[string]cmd.Handler{
18 "version": cmd.Version,
19 "-version": cmd.Version,
20 "--version": cmd.Version,
30 "api_client_authorization": cli.APICall,
31 "api_client": cli.APICall,
32 "authorized_key": cli.APICall,
33 "collection": cli.APICall,
34 "container": cli.APICall,
35 "container_request": cli.APICall,
39 "job_task": cli.APICall,
40 "keep_disk": cli.APICall,
41 "keep_service": cli.APICall,
45 "pipeline_instance": cli.APICall,
46 "pipeline_template": cli.APICall,
47 "repository": cli.APICall,
48 "specimen": cli.APICall,
50 "user_agreement": cli.APICall,
52 "virtual_machine": cli.APICall,
53 "workflow": cli.APICall,
55 "mount": mount.Command,
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))