-
Notifications
You must be signed in to change notification settings - Fork 325
/
helper.go
34 lines (31 loc) · 1.16 KB
/
helper.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package helper
import (
"github.com/loft-sh/devpod/cmd/agent"
"github.com/loft-sh/devpod/cmd/flags"
"github.com/loft-sh/devpod/cmd/helper/http"
"github.com/loft-sh/devpod/cmd/helper/json"
"github.com/loft-sh/devpod/cmd/helper/strings"
"github.com/spf13/cobra"
)
// NewHelperCmd returns a new command
func NewHelperCmd(globalFlags *flags.GlobalFlags) *cobra.Command {
helperCmd := &cobra.Command{
Use: "helper",
Short: "DevPod Utility Commands",
PersistentPreRunE: func(cobraCmd *cobra.Command, args []string) error {
return agent.AgentPersistentPreRunE(cobraCmd, args, globalFlags)
},
Hidden: true,
}
helperCmd.AddCommand(http.NewHTTPCmd(globalFlags))
helperCmd.AddCommand(json.NewJSONCmd(globalFlags))
helperCmd.AddCommand(strings.NewStringsCmd(globalFlags))
helperCmd.AddCommand(NewSSHServerCmd(globalFlags))
helperCmd.AddCommand(NewGetWorkspaceNameCmd(globalFlags))
helperCmd.AddCommand(NewGetWorkspaceConfigCommand(globalFlags))
helperCmd.AddCommand(NewGetProviderNameCmd(globalFlags))
helperCmd.AddCommand(NewCheckProviderUpdateCmd(globalFlags))
helperCmd.AddCommand(NewSSHClientCmd())
helperCmd.AddCommand(NewShellCmd())
return helperCmd
}