nandlabs / golly

golly is a open source library for go
https://golly.nandlabs.io
MIT License
19 stars 2 forks source link

[BUG] The GetQueryParam and GetPathParam functions are defined as router functions #57

Closed nandagopalan closed 2 months ago

nandagopalan commented 2 months ago

The Get Query parameter and get Path param functions are currently defined as router functions.

`// GetPathParam fetches the path parameters func (router Router) GetPathParam(id string, r http.Request) (string, error) { ... } // GetPathParam fetches the path parameters func (router Router) GetPathParam(id string, r http.Request) (string, error) {

.... }

`

we need to make this as public functions as they are dependent only on the http request object.