蛋蛋星球-客户端
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

12345678910111213141516
  1. package utils
  2. import (
  3. "net/url"
  4. "strings"
  5. )
  6. func UriFilterExcludeQueryString(uri string) string {
  7. URL, _ := url.Parse(uri)
  8. clearUri := strings.ReplaceAll(uri, URL.RawQuery, "")
  9. clearUri = strings.TrimRight(clearUri, "?")
  10. return strings.TrimRight(clearUri, "/")
  11. }