reverse/models
weakptr 8c0b7497de
All checks were successful
continuous-integration/drone/push Build is passing
refactor: improve flexibility and project structure (#28)
目的和变更概述

1. 项目目录结构调整,贴近但不完全照搬 [golang-standards/project-layout](https://github.com/golang-standards/project-layout),提供更清晰的目录结构
2. language 结构改为 interface 以提供更好的扩展性和可读性;language 接口支持绑定 target,便于 language 接口提供的 FuncMap 等工具能根据 target 的配置来改变自己的行为,扩展性更好
3. 分离配置结构和反序列化方法到单独的包 `pkg/conf` ,使目录结构和代码更清晰可读
4. 提供多 document 的 yaml 支持,方便要处理多个数据源的场景
5. 添加 underscore ,没什么特别的理由,主要是这套函数式的工具真的很好用,能提高代码可读性;但 underscore 这个库也有问题,因为没泛型全靠 reflect 一把梭,underscore 内部报 reflect 相关错误会比较难排查处理。
6. 添加 `column_name` 选项,生成字段 `ID int64 `xorm:"id pk autoincr"` 这样的 tag,显式建立结构字段名和列名的映射关系。参见 [#27](#27)

Co-authored-by: liuweiqing <liuweiqing@donview.cn>
Co-authored-by: weakptr <weakptr@outlook.com>
Co-authored-by: weakptr <weak_ptr@outlook.com>
Reviewed-on: #28
Co-authored-by: weakptr <weakptr@noreply.gitea.io>
Co-committed-by: weakptr <weakptr@noreply.gitea.io>
2021-06-14 22:17:18 +08:00
..
explicit-column-name refactor: improve flexibility and project structure (#28) 2021-06-14 22:17:18 +08:00
explicit-table-name refactor: improve flexibility and project structure (#28) 2021-06-14 22:17:18 +08:00
include-exclude refactor: improve flexibility and project structure (#28) 2021-06-14 22:17:18 +08:00
multiple refactor: improve flexibility and project structure (#28) 2021-06-14 22:17:18 +08:00
multiple-target refactor: improve flexibility and project structure (#28) 2021-06-14 22:17:18 +08:00
simple refactor: improve flexibility and project structure (#28) 2021-06-14 22:17:18 +08:00