Archive: 2016/9

Golang-基于reflect和tag自动填充struct数据

用Go开发Server端提供一些JSON数据格式的API,会定义业务Model,同时标记其json名字。1234type School struct { ID int `json:"id"` Name string `json:"name"`} 通常也会复用这个Model来接收创建或者更新请求的参数。1234567var