摘要: go语言自带的有csv文件读取模块,看起来好像不错,今天玩玩,也算是系统学习go语言的一部分……^_^ 一、写csv文件 函数: func NewWriter(w io.Writer) *Writer func (w *Writer) Flush() func (w *Writer) Write(r 阅读全文
posted @ 2016-12-07 20:50 赵客缦胡缨-Nicholas 阅读(1715) 评论(0) 推荐(0) 编辑
摘要: 在网上搜索golang编码转化时,我们经常看到的文章是使用下面一些第三方库: https://github.com/djimenez/iconv-go https://github.com/qiniu/iconv 如果我们在windows下使用这个库,会看到错误: iconv.go:6:20: fa 阅读全文
posted @ 2016-12-07 19:50 赵客缦胡缨-Nicholas 阅读(2062) 评论(0) 推荐(0) 编辑
摘要: 要用到的包: "golang.org/x/text/encoding/simplifiedchinese" "golang.org/x/text/transform" func Decode(s []byte) ([]byte, error) { I := bytes.NewReader(s) O 阅读全文
posted @ 2016-12-07 15:42 赵客缦胡缨-Nicholas 阅读(4213) 评论(1) 推荐(0) 编辑