# kratos-tpl **Repository Path**: jason2011/kratos-tpl ## Basic Information - **Project Name**: kratos-tpl - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-10-09 - **Last Updated**: 2024-10-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # wx template for kratos 这个项目是基于 [kratos](https://github.com/go-kratos/kratos) 的项目模板,使用 [cookiecutter](https://github.com/cookiecutter/cookiecutter) 生成项目模板,使用 [wire](https://github.com/google/wire) 生成依赖注入代码。 在做项目中经常会遇到一些重复性的工作,比如创建项目,创建数据库连接,创建路由,创建配置文件等等,这些工作都是重复性的,而且很多时候我们都是按照自己的习惯来创建项目,这样就会导致项目之间的风格不一致,这个项目就是为了解决这些问题,基于平时开发项目提炼出来的一些常用基础组件为模板,以标准规范助力企业研发提速增效。 ## Config ```json { "project_name": "项目名称, 大驼峰命名,空格分隔单词,例如: Kratos Demo", "app_name": "应用名称, 大驼峰命名,空格分隔单词,例如: Order Api", } ``` ## 注意otel包版本的问题,项目中所有服务使用同一个版本 **本项目使用的otel包的版本:** ```shell go get go.opentelemetry.io/otel@v1.11.1 ``` **boot/boot_trace.go中引入otel/semconv的版本:** ``` go get go.opentelemetry.io/otel/semconv/v1.12.0 ``` ``` go get google.golang.org/grpc/1.50.1 go get google.golang.org/protobuf/1.28.0 ``` ```shell pip3 install cookiecutter ``` ```shell cookiecutter https://gitee.com/jason2011/kratos-tpl ``` ```shell make all ``` ```shell curl http://127.0.0.1:18000/helloworld/kratos ```