摘要: Decoder: python package main import ( "encoding/json" "fmt" "io" "log" "strings" ) func main ( ) { const jsonStream = ` { "Name" : "Ed" , "Text" : "Kn 阅读全文
posted @ 2019-09-10 17:09 xushukui 阅读(1845) 评论(0) 推荐(0) 编辑
摘要: golang 中 map 转 struct golang 中 json转 map python package main import ( "fmt" "encoding/json" ) func JsonToMap() { jsonStr := ` { "name":"liangyongxing" 阅读全文
posted @ 2019-09-10 11:32 xushukui 阅读(17494) 评论(0) 推荐(0) 编辑
摘要: ``` python package main import ( "fmt" "encoding/json" ) type ItemMessage struct { ItemType int ItemId int ItemCount int GoodsStatue GoodsStatue } typ 阅读全文
posted @ 2019-09-10 11:20 xushukui 阅读(2088) 评论(0) 推荐(0) 编辑
摘要: ``` python package main import ( "fmt" "sync" "time" ) / ticker只要定义完成,从此刻开始计时,不需要任何其他的操作,每隔固定时间都会触发。 timer定时器,是到固定时间后会执行一次 如果timer定时器要每隔间隔的时间执行,实现tick 阅读全文
posted @ 2019-09-10 10:48 xushukui 阅读(3070) 评论(0) 推荐(0) 编辑