url中带特殊符号

import (
"fmt"
"net/url"
)

func main() {
urlStr := "liu ##ji kj"
escapeUrl := url.QueryEscape(urlStr)
fmt.Println(escapeUrl)
}

put:
liu+%23%23ji++kj

posted @ 2022-12-26 14:58  别吃韩信中线  阅读(19)  评论(0编辑  收藏  举报