feat(Go-StudyExample):创建项目,添加使用示例如下:
map与struct之间转换的处理工具使用示例,参考代码地址:https://github.com/mitchellh/mapstructure json与struct之间转换处理工具使用示例
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* @Author : huangzj
|
||||
* @Time : 2020/4/28 17:17
|
||||
* @Description:
|
||||
*/
|
||||
|
||||
package main
|
||||
|
||||
import "Go-StudyExample/example"
|
||||
|
||||
func main() {
|
||||
//--------------------------测试mapStructure的功能-----
|
||||
//这边的四种使用方式差别感觉不是很大...
|
||||
example.MapStructureTestFunc()
|
||||
example.MapStructureTestFunc1()
|
||||
example.MapStructureTestFunc2()
|
||||
example.MapStructureTestFunc3()
|
||||
|
||||
//--------------------------测试json包的转换功能
|
||||
example.JsonMarshalTest()
|
||||
example.JsonUnmarshalTest()
|
||||
}
|
||||
Reference in New Issue
Block a user