摘要: 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 阅读(1711) 评论(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 阅读(2051) 评论(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 阅读(4211) 评论(1) 推荐(0) 编辑
摘要: 1.Learning Go 《学习Go语言》 http://www.miek.nl/projects/learninggo/中文版http://mikespook.com/learning-go/2.Go by ExampleGo is an open source programming lang 阅读全文
posted @ 2016-11-29 17:07 赵客缦胡缨-Nicholas 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 一:首先man.go,整个程序的入口 func main() { beego.Run() } 然后beego.run()代码 // Run beego application. // beego.Run() default run on HttpPort // beego.Run(":8089") 阅读全文
posted @ 2016-11-24 17:04 赵客缦胡缨-Nicholas 阅读(3127) 评论(0) 推荐(0) 编辑
摘要: //4、多列排序 //示例:http://www.guoxk.com/html/DataTables/Multi-column-sorting.html //5、隐藏某些列 $(document).ready(function() { $('#example').dataTable( { "aoCo 阅读全文
posted @ 2016-11-23 15:30 赵客缦胡缨-Nicholas 阅读(253) 评论(0) 推荐(0) 编辑
摘要: package main import ( "fmt" "time" ) var ch chan int = make(chan int, 1) func main() { go aaa() select { case <-ch: //拿到锁 fmt.Println("call") case <-time.After(5 *... 阅读全文
posted @ 2016-09-06 17:47 赵客缦胡缨-Nicholas 阅读(758) 评论(0) 推荐(0) 编辑
摘要: 【代码】golang 实现的文件服务(包括上传,下载的server端和client端) 【代码】golang 实现的文件服务(包括上传,下载的server端和client端) 阅读全文
posted @ 2016-09-05 11:41 赵客缦胡缨-Nicholas 阅读(8316) 评论(2) 推荐(0) 编辑
摘要: supervisord的官网:http://supervisord.org。 Supervisor是一个客户/服务器系统,它可以在类Unix系统中管理控制大量进程。Supervisor使用python开发,有多年历史,目前很多生产环境下的服务器都在使用Supervisor。 Supervisor的服 阅读全文
posted @ 2016-09-02 14:22 赵客缦胡缨-Nicholas 阅读(3208) 评论(0) 推荐(0) 编辑
摘要: golang追加内容到文件末尾 阅读全文
posted @ 2016-08-31 17:06 赵客缦胡缨-Nicholas 阅读(1627) 评论(0) 推荐(0) 编辑