forked from redhat-developer/odo
/
debug.go
31 lines (22 loc) · 832 Bytes
/
debug.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
package debug
import (
"github.com/openshift/odo/pkg/odo/util"
"github.com/spf13/cobra"
)
// RecommendedCommandName is the recommended debug command name
const RecommendedCommandName = "debug"
var DebugLongDesc = `Warning - Debug is currently in tech preview and hence is subject to change in future.
Debug allows you to remotely debug your application`
func NewCmdDebug(name, fullName string) *cobra.Command {
portforwardCmd := NewCmdPortForward(portforwardCommandName, util.GetFullName(fullName, portforwardCommandName))
debugCmd := &cobra.Command{
Use: name,
Short: "Debug commands",
Long: DebugLongDesc,
Aliases: []string{"d"},
}
debugCmd.SetUsageTemplate(util.CmdUsageTemplate)
debugCmd.AddCommand(portforwardCmd)
debugCmd.Annotations = map[string]string{"command": "main"}
return debugCmd
}