gpt4 book ai didi

python - Go 中的 urllib.quote()?

转载 作者:IT王子 更新时间:2023-10-29 02:16:31 25 4
gpt4 key购买 nike

Go 中有没有函数与 Python 中的 urllib.quote(string) 一样工作?谢谢!
urllib.quote() 的文档页面:https://docs.python.org/2/library/urllib.html

最佳答案

url.QueryEscape

http://play.golang.org/p/yNZZT-Xmfs

func main() {
fmt.Println(url.QueryEscape("/Hello, playground"))
}

// %2FHello%2C+playground

关于python - Go 中的 urllib.quote()?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27556773/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com