mirror of
https://github.com/hay-kot/homebox.git
synced 2025-07-22 10:30:28 +00:00
introduce experimental adapter pattern for hdlrs
This commit is contained in:
parent
b82fbb01f5
commit
b0a9c510ad
5 changed files with 153 additions and 2 deletions
|
@ -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}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue