...
1 package validate
2
3 import (
4 "fmt"
5
6 devfilev1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
7 )
8
9
10 type NoComponentsError struct {
11 }
12
13 func (e *NoComponentsError) Error() string {
14 return "no components present"
15 }
16
17
18 type NoContainerComponentError struct {
19 }
20
21 func (e *NoContainerComponentError) Error() string {
22 return fmt.Sprintf("odo requires atleast one component of type '%s' in devfile", devfilev1.ContainerComponentType)
23 }
24
25
26 type UnsupportedOdoCommandError struct {
27 commandId string
28 }
29
30 func (e *UnsupportedOdoCommandError) Error() string {
31 return fmt.Sprintf("command %q must be of type \"exec\" or \"composite\"", e.commandId)
32 }
33
View as plain text