https://github.com/snowlyg/gotransformer
golang 简单实现接口数据格式化
https://github.com/snowlyg/gotransformer
api beego-orm golang gorm transformer
Last synced: 3 months ago
JSON representation
golang 简单实现接口数据格式化
- Host: GitHub
- URL: https://github.com/snowlyg/gotransformer
- Owner: snowlyg
- License: mit
- Created: 2019-12-24T06:11:44.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-11-19T06:48:27.000Z (over 3 years ago)
- Last Synced: 2025-04-11T20:12:16.346Z (3 months ago)
- Topics: api, beego-orm, golang, gorm, transformer
- Language: Go
- Homepage: https://github.com/snowlyg/gotransformer
- Size: 84 KB
- Stars: 13
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
gotransformer
>本项目主要是用于数据的格式化和转换。
>使用场景:当模型数据字段太多,同时很多字段数据在接口输出的时候又需要做特殊处理(比如时间,数组,json等等)。
>使用场景:不同接口或者不同角色可能需要做不同的数据处理(比如列表,详情等等)。#### 更新日志
[更新日志](UPDATE.MD)#### Require
- go 1.13.x#### 支持格式化方式
- [简单格式化](_example/struct/struct.go)
- [自定义方法格式化](_example/struct/struct.go)
- [关联数据格式化](_example/struct/struct.go)
- [时间数据格式化](_example/struct/struct.go)
- [map数据格式化](_example/map/map.go)
- [excel 导入数据格式化](_example/excel/excel.go)- 具体项目使用实例,请参考[https://github.com/snowlyg/IrisAdminApi](https://github.com/snowlyg/IrisAdminApi)
## Installation
```
go get github.com/snowlyg/gotransformer@master
```