
Go
yzl11
付出往往要>回报
展开
-
使用go build 进行条件编译
http://blog.youkuaiyun.com/varding/article/details/12675971转载 2015-12-14 09:40:16 · 1324 阅读 · 0 评论 -
一个有关Golang变量作用域的坑
临近下班前编写和调试一段Golang代码,但运行结果始终与期望不符,怪异的很,下班前依旧无果。代码Demo如下: //testpointer.go package main import ( "fmt" ) var p *int func foo() (*int, error) { var i int = 5 ret转载 2015-12-16 10:56:12 · 687 阅读 · 0 评论 -
编解码JSON数据
package main import ( _ "fmt" "encoding/json" "log" ) type Book struct { Title string Authors []string Publisher string IsPublished bool Price float32 } func main() { gobook := Book { "G原创 2015-12-06 13:02:16 · 988 阅读 · 0 评论 -
解码未知结构的JSON数据
如果要解码一段未知结构的JSON,只需将这段JSON数据解码输出到一个空接口即可。在解码JSON数据的过程中,JSON数据里边的元素类型将做如下转换: 1)JSON中的布尔值将会转换为Go中的bool类型; 2)数值会被转换为Go中的float64类型; 3)字符串转换后还是string类型; 4)JSON数组会转换为[]interface{}类型; 5)JSON对象会转换为map[st原创 2015-12-06 15:29:12 · 3675 阅读 · 0 评论 -
Macaron文档说明
https://go-macaron.com/docs/middlewares/routing原创 2016-01-15 08:58:21 · 1147 阅读 · 0 评论 -
GO备忘录
http://studygolang.com/articles/4787转载 2016-03-17 18:42:37 · 236 阅读 · 0 评论 -
golang中发送http请求的几种常见情况
http://studygolang.com/articles/4489转载 2016-03-17 18:43:41 · 1642 阅读 · 0 评论 -
GO语言练习:构建json 和 解析JSON 实例
http://www.cnblogs.com/fengbohello/p/4665883.html转载 2016-03-17 18:45:09 · 464 阅读 · 0 评论 -
在Go语言中使用JSON
http://blog.youkuaiyun.com/tiaotiaoyly/article/details/38942311转载 2016-03-18 09:27:11 · 273 阅读 · 0 评论