2014年11月27日

Golang:测试map是否存在

摘要: 请看这个url:http://www.du52.com/text.php?id=561 if v, ok := m1["a"]; ok { fmt.Println(v) } else { fmt.Println("Key Not Found") } 阅读全文

posted @ 2014-11-27 22:21 awildfish 阅读(2883) 评论(0) 推荐(0) 编辑

beego: 获取request参数

摘要: beego提供了一套web开发的框架。但我们在开发过程中遇到了一些问题,现汇总如下。测试1:测试只有keys数组的情况func (this *TestController) Index() {keys := make([]string, 0)this.Ctx.Input.Bind(&keys, "k... 阅读全文

posted @ 2014-11-27 21:42 awildfish 阅读(10952) 评论(0) 推荐(0) 编辑

shell:crontab

摘要: crontab*/1 * * * * (cd /home/q/system/project; /usr/bin/lockf -t 0 /tmp/discuz_bbs_audit.lock /usr/local/php/bin/php audit_cron.php) >> /home/q/system... 阅读全文

posted @ 2014-11-27 10:25 awildfish 阅读(130) 评论(0) 推荐(0) 编辑

导航