spud/service_definition/errors.go

25 lines
468 B
Go
Raw Normal View History

2024-06-02 06:03:47 +00:00
package service_definition
type FileDoesNotExistError struct {
Message string
ExpectedPath string
}
func (r *FileDoesNotExistError) Error() string {
prefix := "File not found"
if r.Message != "" {
prefix = r.Message
}
return prefix + ": " + r.ExpectedPath
}
type InvalidServiceDefinitionError struct {
Path string
}
func (r *InvalidServiceDefinitionError) Error() string {
return "Service definition does not satisfy expected schema: " + r.Path
}