From ea5481cc6dda66634492ceb0b0b188affd907af4 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 19 Mar 2025 07:53:00 -0500 Subject: [PATCH] fix to mirror gin syntax --- gin.go | 4 ++-- go.mod | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 go.mod diff --git a/gin.go b/gin.go index 3a41436..e050ade 100644 --- a/gin.go +++ b/gin.go @@ -31,7 +31,7 @@ type Params []Param func (engine *Engine) allocateContext(maxParams uint16) *Context { v := make(Params, 0, maxParams) - return &Context{engine: engine, params: &v} + return &Context{engine: engine, Params: &v} } func New(opts ...OptionFunc) *Engine { @@ -72,7 +72,7 @@ func Default(opts ...OptionFunc) *Engine { type Context struct { writermem responseWriter engine *Engine - params *Params + Params *Params Request *http.Request handlers HandlersChain diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..d0a2b8a --- /dev/null +++ b/go.mod @@ -0,0 +1,5 @@ +module go.wit.com/lib/http/ginpb + +go 1.22 + +toolchain go1.24.1