Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
joe/error.go
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
16 lines (13 sloc)
659 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package joe | |
// Error is the error type used by Joe. This allows joe errors to be defined as | |
// constants following https://dave.cheney.net/2016/04/07/constant-errors. | |
type Error string | |
// Error implements the "error" interface of the standard library. | |
func (err Error) Error() string { | |
return string(err) | |
} | |
// ErrNotImplemented is returned if the user tries to use a feature that is not | |
// implemented on the corresponding components (e.g. the Adapter). For instance, | |
// not all Adapter implementations may support emoji reactions and trying to | |
// attach a reaction to a message might return this error. | |
const ErrNotImplemented = Error("not implemented") |