蛋蛋星球 后台端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

17 lines
275 B

  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. }