From 5d3f5417318637a976b35cc24e79395d2f03d748 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20C=2E=20For=C3=A9s?= Date: Fri, 1 May 2026 12:39:07 +0200 Subject: [PATCH] fix(framework): make hook funcs aliases --- contract/hooks.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contract/hooks.go b/contract/hooks.go index 3c8aaf7..86431ba 100644 --- a/contract/hooks.go +++ b/contract/hooks.go @@ -14,17 +14,17 @@ var HooksKey = hooksKey{} // AfterResponseHook is a callback invoked after the full HTTP response // has been written. It receives the error returned by the handler, // which may be nil if the handler succeeded. -type AfterResponseHook func(err error) +type AfterResponseHook = func(err error) // BeforeWriteHeaderHook is a callback invoked just before the // response status code is written. It receives the response writer // and the status code that is about to be sent. -type BeforeWriteHeaderHook func(w http.ResponseWriter, status int) +type BeforeWriteHeaderHook = func(w http.ResponseWriter, status int) // BeforeWriteHook is a callback invoked just before response body // bytes are written. It receives the response writer and the byte // slice that is about to be sent. -type BeforeWriteHook func(w http.ResponseWriter, content []byte) +type BeforeWriteHook = func(w http.ResponseWriter, content []byte) // Hooks defines the contract for registering and retrieving // lifecycle callbacks during HTTP request processing. Middleware