AddCommands adds all of the "srclib ..." subcommands (toolchain, tool, make, etc.) as subcommands on c.
It is used to create the "srclib" command, but it can also be used to mount the srclib CLI underneath any other CLI tool's command, such as "mytool srclib ...".
cli.LongDescription = "srclib builds projects, analyzes source code, and queries Sourcegraph." cli.AddGroup("Global options", "", &GlobalOpt) AddCommands(cli.Command) _, err := cli.Parse()