Commit 4a958838 authored by Kyle Clarke's avatar Kyle Clarke

A KevingError need not be public either, lowercased.

parent 2b4b6ecb
package kevin
// KevinError is the package level error struct.
type KevinError struct {
// kevinError is the package level error struct.
type kevinError struct {
s string
}
......@@ -38,17 +38,17 @@ var (
)
// Error() will return the error string value.
func (e KevinError) Error() string {
func (e kevinError) Error() string {
return e.s
}
// IsKevinError will return true on KevinError instance.
// IsKevinError will return true on kevinError instance.
func IsKevinError(err error) bool {
_, ok := err.(*KevinError)
_, ok := err.(*kevinError)
return ok
}
// NewKevinError will return a new KevinError instance.
func NewKevinError(errorMessage string) error {
return &KevinError{errorMessage}
return &kevinError{errorMessage}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment