- 使用 go:embed 导入配置文件,避免在运行时读取文件系统中的配置 - 移除了文件读取相关代码,简化了配置加载过程 - 这种方法提高了应用程序的可移植性和安全性
*** Project
introduce
- Use the Kitex framework
- Generating the base code for unit tests.
- Provides basic config functions
- Provides the most basic MVC code hierarchy.
Directory structure
catalog | introduce |
---|---|
conf | Configuration files |
main.go | Startup file |
handler.go | Used for request processing return of response. |
kitex_gen | kitex generated code |
biz/service | The actual business logic. |
biz/dal | Logic for operating the storage layer |
How to run
sh build.sh
sh output/bootstrap.sh