cli/pkg/cmd/codespace/root.go
Mislav Marohnić 3b7e5fc246 Store Executable() information on codespaces App
This is to avoid having to explicitly pass it to each subcommand that
needs it. Each codespaces command runs in the context of App, so that's
a point of shared context that we can store state in.
2021-12-21 14:03:10 +01:00

24 lines
525 B
Go

package codespace
import (
"github.com/spf13/cobra"
)
func NewRootCmd(app *App) *cobra.Command {
root := &cobra.Command{
Use: "codespace",
Short: "Connect to and manage your codespaces",
}
root.AddCommand(newCodeCmd(app))
root.AddCommand(newCreateCmd(app))
root.AddCommand(newDeleteCmd(app))
root.AddCommand(newListCmd(app))
root.AddCommand(newLogsCmd(app))
root.AddCommand(newPortsCmd(app))
root.AddCommand(newSSHCmd(app))
root.AddCommand(newCpCmd(app))
root.AddCommand(newStopCmd(app))
return root
}