Documentation ¶
Index ¶
- Constants
- func HasIssueLink(err error) bool
- func HasUnimplementedError(err error) bool
- func IsIssueLink(err error) bool
- func IsUnimplementedError(err error) bool
- func UnimplementedError(issueLink IssueLink, msg string) error
- func UnimplementedErrorf(issueLink IssueLink, format string, args ...interface{}) error
- func WithIssueLink(err error, issue IssueLink) error
- type IssueLink
Constants ¶
const UnimplementedErrorHint = `You have attempted to use a feature that is not yet implemented.`
UnimplementedErrorHint is the hint emitted upon unimplemented errors.
Variables ¶
This section is empty.
Functions ¶
func HasIssueLink ¶
HasIssueLink returns true iff the error or one of its causes has a linked issue payload.
func HasUnimplementedError ¶
HasUnimplementedError returns iff if err or its cause is an unimplemented error.
func IsIssueLink ¶
IsIssueLink returns true iff the error (not its causes) has a linked issue payload.
func IsUnimplementedError ¶
IsUnimplementedError returns iff if err is an unimplemented error.
func UnimplementedError ¶
UnimplementedError creates a new leaf error that indicates that some feature was not (yet) implemented.
Detail is shown: - via `errors.GetSafeDetails()` - when formatting with `%+v`. - in Sentry reports. - via `errors.GetAllHints()` / `errors.FlattenHints()`
func UnimplementedErrorf ¶
UnimplementedErrorf creates a new leaf error that indicates that some feature was not (yet) implemented. The message is formatted.
func WithIssueLink ¶
WithIssueLink adds an annotation to a know issue on a web issue tracker.
The url and detail strings may contain PII and will be considered reportable.
Detail is shown: - via `errors.GetSafeDetails()` - when formatting with `%+v`. - in Sentry reports. - via `errors.GetAllHints()` / `errors.FlattenHints()`
Types ¶
type IssueLink ¶
type IssueLink struct { // URL to the issue on a tracker. IssueURL string // Annotation that characterizes a sub-issue. Detail string }
IssueLink is the payload for a linked issue annotation.
func GetAllIssueLinks ¶
GetAllIssueLinks retrieves the linked issue carried by the error or its direct causes.
func GetIssueLink ¶
GetIssueLink retrieves the linked issue annotation carried by the error, or false if there is no such annotation.