Açıklama Yok

dcsunny 2a16195ad2 将trace_conf添加到wire里面 4 yıl önce
api f9e99750fc 调整项目生成的模板 4 yıl önce
cmd 2a16195ad2 将trace_conf添加到wire里面 4 yıl önce
configs 478127fa4e init 4 yıl önce
internal 2a16195ad2 将trace_conf添加到wire里面 4 yıl önce
.gitignore 478127fa4e init 4 yıl önce
Dockerfile bbd4113cf0 新增docker 4 yıl önce
LICENSE 478127fa4e init 4 yıl önce
Makefile f9e99750fc 调整项目生成的模板 4 yıl önce
README.md 478127fa4e init 4 yıl önce
build.sh 139e3c081f 更新构建包 4 yıl önce
generate.go 478127fa4e init 4 yıl önce
go.mod 05527f0e0c 更新kratos 4 yıl önce
go.sum 2a16195ad2 将trace_conf添加到wire里面 4 yıl önce
start.sh 478127fa4e init 4 yıl önce

README.md

Kratos Project Template

Install Kratos

go get -u github.com/go-kratos/kratos/cmd/kratos/v2@latest

Create a service

# create a template project
kratos new helloworld

cd helloworld
# Add a proto template
kratos proto add api/helloworld/helloworld.proto
# Generate the source code of service by proto file
kratos proto server api/helloworld/helloworld.proto -t internal/service

go generate ./...
go build -o ./bin/ ./...
./bin/helloworld -conf ./configs

Automated Initialization (wire)

# install wire
go get github.com/google/wire/cmd/wire

# generate wire
cd cmd/server
wire