golang
追随她的旅程
苦海翻起爱恨,在世间难逃避命运。
展开
-
Golang 框架
https://github.com/julienschmidt/httprouter安装go web框架httproutergo get github.com/julienschmidt/httprouter ——————————————————————————————https://github.com/go-sql-driver/mysql安装go mysql数据库框架...原创 2019-03-19 17:22:52 · 385 阅读 · 0 评论 -
golang 爬虫解决gbk编码转UTF-8
在用golang编写爬虫程序时,会碰见编码格式gb2312的页面。网页页面上可以看出该页面字符编码为gb2312<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />而golang默认是支持UTF-8编码格式的,这样直接爬下来的结果会乱码。使用 github.com/axgle/mah...原创 2019-03-18 09:08:42 · 3865 阅读 · 0 评论 -
golang mysql数据库操作 转载
采编于https://www.jianshu.com/p/ee87e989f149经过几个视频教程学习和搜索结果,在Golang中使用https://github.com/go-sql-driver/mysql来访问数据库。安装方法go get github.com/go-sql-driver/mysq使用方法import "database/sql"import _ ...转载 2019-04-06 11:57:35 · 127 阅读 · 0 评论