广告平台(总站长使用)
25개 이상의 토픽을 선택하실 수 없습니다. 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. }