enbas/internal/executor/errors.go
Dan Anglin 55b93c6586
fix(breaking): update project structure
Move all executors to the internal folder package. This PR also comes
with additional breaking changes.

Changes:

- refactor: move all executors to the internal/executor package.
- refactor: update naming patterns for constants, variables, custom
  types, etc.
- fix(breaking): renamed the update command to edit.
- fix(breaking): update the flags for the switch command to make it
  more generic.
- fix(breaking): renamed the show-account-relationship flag to
  show-relationship.
- fix: update the print message from the whoami command.
2024-05-23 18:06:49 +01:00

55 lines
1.3 KiB
Go

package executor
type FlagNotSetError struct {
flagText string
}
func (e FlagNotSetError) Error() string {
return "the flag '" + e.flagText + "' is not set"
}
type UnsupportedTypeError struct {
resourceType string
}
func (e UnsupportedTypeError) Error() string {
return "unsupported resource type '" + e.resourceType + "'"
}
type InvalidTimelineCategoryError struct {
category string
}
func (e InvalidTimelineCategoryError) Error() string {
return "'" + e.category + "' is not a valid timeline category (please choose home, public, tag or list)"
}
type NoAccountSpecifiedError struct{}
func (e NoAccountSpecifiedError) Error() string {
return "no account specified in this request"
}
type UnsupportedAddOperationError struct {
ResourceType string
AddToResourceType string
}
func (e UnsupportedAddOperationError) Error() string {
return "adding '" + e.ResourceType + "' to '" + e.AddToResourceType + "' is not supported"
}
type UnsupportedRemoveOperationError struct {
ResourceType string
RemoveFromResourceType string
}
func (e UnsupportedRemoveOperationError) Error() string {
return "removing '" + e.ResourceType + "' from '" + e.RemoveFromResourceType + "' is not supported"
}
type EmptyContentError struct{}
func (e EmptyContentError) Error() string {
return "content should not be empty"
}