最近发布的主题
最近发布的文章
最近分享的资源
最近发布的项目
- Go 日志库 slog at
- Go 辅助工具库 Goutil at
- Go命令行应用 gcli at
- Go 事件调度库 event at
- Go 验证库 validate at
最近的评论
-
#1楼 @RafaelShin 有的 https://gitee.com/gookit/slog
-
@liangmanlin 有需要可以看看,不需要的忽略即可
-
评论了资源 Go应用配置管理,支持多种格式,多文件加载
-
评论了项目 Go 验证库validate
-
字段是固定的吗 是的话用struct比较合适 ```go type DateItem struct { CreateTime string `json:"create_time"` // .... } list := new([]DateItem) jsonString := `[{"create_time":"2018年10月20日 12:42:30"}, {"create_time":"2018年10月19日 11:48:30"}]` err := json.Unmarshal([]byte(jsonString), list) if err != nil { panic(err) } fmt.Printf("%+v\n", list) // Output: // &[{CreateTime:2018年10月20日 12:42:30} {CreateTime:2018年10月19日 11:48:30}] ``` 然后就可以直接 for list 了