go语言 map转成struct结构(调用第三方包)
时光弧线 5年前 (2016-05-31) 937浏览 0评论
package main import ( "encoding/json" "fmt" "github.com/goinggo/mapstructure" ) //把请求包定义成一个结构体 type Requestbody ...
时光弧线 5年前 (2016-05-31) 937浏览 0评论
package main import ( "encoding/json" "fmt" "github.com/goinggo/mapstructure" ) //把请求包定义成一个结构体 type Requestbody ...
时光弧线 5年前 (2016-05-31) 1368浏览 0评论
这篇blog将给大家介绍在go语言项目使用Redis作为数据持久层。开始之前我将介绍几个基本概念,然后构建一个go web项目来展示如何让Redis实现安全的并发。 这篇blog是假设你是了解Redis的一些东西的,如果你之前没有学习或者了解过Red...
时光弧线 5年前 (2016-05-27) 1060浏览 0评论
首先安装LNMP环境,要求PHP-5.3以上版本. 参考:http://isadba.com/?p=82 或者参考 http://isadba.com/?p=572 然后下载Anemometer git clone https://github...
时光弧线 5年前 (2016-05-27) 1102浏览 0评论
time包中包括两类时间:时间点(某一时刻)和时常(某一段时间) 1时间常量(时间格式化) const ( ANSIC = "Mon Jan _2 15:04:05 2006" UnixDate = "Mon J...
时光弧线 5年前 (2016-05-18) 1060浏览 0评论
Golang中的正则表达式 【用法】 单一: . 匹配任意一个字符,如果设置 s = true,则可以匹配换行符 [字符类] 匹配“字符类”中的一个字符,“字符类”见后面...
时光弧线 5年前 (2016-05-05) 1253浏览 0评论
1、http://www.oschina.net/code/snippet_173630_12006 : 2、https://github.com/dchest/captcha 它比较强大,可以生成图片的验证码或者音频验证码。 3、在GAE上使用的...
时光弧线 5年前 (2016-05-05) 1117浏览 0评论
package main import ( “image” “image/color” “image/png” “io” “net/http&...
时光弧线 5年前 (2016-05-03) 907浏览 0评论
package main import ( "encoding/json" "fmt" "os" ) type ConfigStruct struct { Host string `json:"hos...