MCPcopy Create free account
hub / github.com/devfile/api / Key

Method Key

pkg/apis/workspaces/v1alpha1/keyed.go:100–129  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

98}
99
100func (keyed Command) Key() (string, error) {
101 key := ""
102 err := keyed.Visit(CommandVisitor{
103 Apply: func(command *ApplyCommand) error {
104 key = command.Id
105 return nil
106 },
107 Exec: func(command *ExecCommand) error {
108 key = command.Id
109 return nil
110 },
111 Composite: func(command *CompositeCommand) error {
112 key = command.Id
113 return nil
114 },
115 Custom: func(command *CustomCommand) error {
116 key = command.Id
117 return nil
118 },
119 VscodeLaunch: func(command *VscodeConfigurationCommand) error {
120 key = command.Id
121 return nil
122 },
123 VscodeTask: func(command *VscodeConfigurationCommand) error {
124 key = command.Id
125 return nil
126 },
127 })
128 return key, err
129}

Callers

nothing calls this directly

Calls 1

VisitMethod · 0.95

Tested by

no test coverage detected