aboutsummaryrefslogtreecommitdiffstats
path: root/modules/context/base.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/context/base.go')
-rw-r--r--modules/context/base.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/context/base.go b/modules/context/base.go
index 83e5a214f8..8df1dde866 100644
--- a/modules/context/base.go
+++ b/modules/context/base.go
@@ -147,6 +147,10 @@ func (b *Base) Params(p string) string {
return s
}
+func (b *Base) PathParamRaw(p string) string {
+ return chi.URLParam(b.Req, strings.TrimPrefix(p, ":"))
+}
+
// ParamsInt64 returns the param on route as int64
func (b *Base) ParamsInt64(p string) int64 {
v, _ := strconv.ParseInt(b.Params(p), 10, 64)