introduce experimental adapter pattern for hdlrs

This commit is contained in:
Hayden 2023-03-04 22:41:12 -09:00
parent b82fbb01f5
commit b0a9c510ad
No known key found for this signature in database
GPG key ID: 17CF79474E257545
5 changed files with 153 additions and 2 deletions

View file

@ -5,7 +5,8 @@ import (
"errors"
)
type UnauthorizedError struct{}
type UnauthorizedError struct {
}
func (err *UnauthorizedError) Error() string {
return "unauthorized"
@ -28,7 +29,7 @@ func (err *InvalidRouteKeyError) Error() string {
return "invalid route key: " + err.key
}
func NewInvalidRouteKeyError(key string) error {
func NewRouteKeyError(key string) error {
return &InvalidRouteKeyError{key}
}