Dan Anglin
4f694465bf
- Added constants for flag names and resource types - Added an error type for when a required flag is not set - Added an error type for when an unsupported resource type is specified - Renamed timeline-type to timeline-category
25 lines
572 B
Go
25 lines
572 B
Go
package main
|
|
|
|
type flagNotSetError struct {
|
|
flagText string
|
|
}
|
|
|
|
func (e flagNotSetError) Error() string {
|
|
return "the flag '" + e.flagText + "' is not set"
|
|
}
|
|
|
|
type unsupportedResourceTypeError struct {
|
|
resourceType string
|
|
}
|
|
|
|
func (e unsupportedResourceTypeError) 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)"
|
|
}
|