fix linter/test errors

This commit is contained in:
Hayden 2024-04-28 12:21:43 -05:00
parent 0c968de1fb
commit d7fd68765a
No known key found for this signature in database
GPG key ID: 17CF79474E257545
40 changed files with 207 additions and 212 deletions

View file

@ -6,5 +6,7 @@ import (
"github.com/google/uuid"
)
type AdapterFunc[T any, Y any] func(*http.Request, T) (Y, error)
type IDFunc[T any, Y any] func(*http.Request, uuid.UUID, T) (Y, error)
type (
AdapterFunc[T any, Y any] func(*http.Request, T) (Y, error)
IDFunc[T any, Y any] func(*http.Request, uuid.UUID, T) (Y, error)
)

View file

@ -8,8 +8,10 @@ import (
"github.com/hay-kot/httpkit/server"
)
type CommandFunc[T any] func(*http.Request) (T, error)
type CommandIDFunc[T any] func(*http.Request, uuid.UUID) (T, error)
type (
CommandFunc[T any] func(*http.Request) (T, error)
CommandIDFunc[T any] func(*http.Request, uuid.UUID) (T, error)
)
// Command is an HandlerAdapter that returns a errchain.HandlerFunc that
// The command adapters are used to handle commands that do not accept a body