package main
import(
"fmt"
"net/url"
)
func main() {
var urlStr string = "https://www.baidu.com"
escapeUrl := url.QueryEscape(urlStr)
fmt.Println("编码:",escapeUrl)
enEscapeUrl, _ := url.QueryUnescape(escapeUrl)
fmt.Println("解码:",enEscapeUrl)
}
当前位置:网站首页>golang中的URL 的编码和解码(转)
golang中的URL 的编码和解码(转)
2022-08-10 03:16:00 【Lucky小黄人】
边栏推荐
- Take you to an in-depth understanding of the version update of 3.4.2, what does it bring to users?
- Research on IC enterprises
- 轻流CEO薄智元:从无代码到无边界
- ...spread、命名空间、假报错、变化事件、async/await
- uni-app自定义导航栏
- HackTheBox——Beep
- The Evolutionary History of the "Double Gun" Trojan Horse Virus
- 二维空间下的向量旋转
- 有关视频传输时粘包问题的一些解决方法
- 软件的生命周期(软件工程各阶段的工作)
猜你喜欢
vite基础,vite中 `@`符号是不被支持,不用@符号,直接用层级(./,../等)
Difference between netstat and ss command
Meteor accelerator Trojan analysis and disposal plan
flink 12 源码编译及使用idea运行、debug
The Evolutionary History of the "Double Gun" Trojan Horse Virus
Mini Program Navigation and Navigation Parameters
Little rookie Hebei Unicom induction training essay
新零售社交电商APP系统平台如何打造公域+私域流量?
How does a new tester do functional testing?Test thinking is really important
使用注解实现限流
随机推荐
电子产品结构设计中的电磁兼容性(EMC)设计
...spread、命名空间、假报错、变化事件、async/await
过水滑环的结构和工作原理
YAPI使用
怎么进行服务器性能监控,有什么监控工具
PostgreSQL相关语法及指令示例
netstat和ss命令区别
软件测试这些基本类型你知道吗?
@Autowired注解 --required a single bean, but 2 were found出现的原因以及解决方法
Example 048: Number ratio size
HackTheBox——Beep
Small program subcontracting and subcontracting pre-download
10个超赞的C语言开源项目,值得学习
program internationalization
plsql 查询数据库操作历史记录(Ctrl + e)
flutter 制作嵌套列表
How to write a high-quality test case?
轻流CEO薄智元:从无代码到无边界
测试工作管理与规范
电话自动拨号在电脑上自动拨打