refactor: handler signature an middlewares for an idiomatic solution #24

Merged
xdrm-brackets merged 6 commits from refactor/api-context into 0.4.0 2021-06-20 07:51:42 +00:00
1 changed files with 1 additions and 1 deletions
Showing only changes of commit 6a78351a2c - Show all commits

View File

@ -261,7 +261,7 @@ type res struct{
Output2 bool
}
func myHandler(r req) (*res, api.Err) {
func myHandler(ctx *api.Context, r req) (*res, api.Err) {
err := doSomething()
if err != nil {
return nil, api.ErrFailure