From e39b234486f0b20ba13ade2d97b6c150f594b9ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=BC=9F=E4=B9=90?= Date: Thu, 2 Mar 2023 15:13:28 +0800 Subject: [PATCH] pkg --- pkg/xstring/stringx.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/xstring/stringx.go b/pkg/xstring/stringx.go index 1769eee..1341806 100644 --- a/pkg/xstring/stringx.go +++ b/pkg/xstring/stringx.go @@ -597,3 +597,12 @@ func Lcfirst(str string) string { } return "" } + +func GetUrlRequestURI(url string) string { + urls := strings.Split(url, "?") + urls = strings.Split(urls[0], " ") + if len(urls) > 1 { + return urls[1] + } + return "" +}