Sen descrición

dcsunny f674da2e95 feat: 更新相关包 hai 1 ano
api f674da2e95 feat: 更新相关包 hai 1 ano
cmd fa72db8274 配置改为指针 %!s(int64=3) %!d(string=hai) anos
configs 478127fa4e init %!s(int64=4) %!d(string=hai) anos
internal f674da2e95 feat: 更新相关包 hai 1 ano
.gitignore 478127fa4e init %!s(int64=4) %!d(string=hai) anos
Dockerfile bbd4113cf0 新增docker %!s(int64=4) %!d(string=hai) anos
Jenkinsfile a74f75a54e update go.mod %!s(int64=3) %!d(string=hai) anos
JenkinsfilePro a74f75a54e update go.mod %!s(int64=3) %!d(string=hai) anos
LICENSE 478127fa4e init %!s(int64=4) %!d(string=hai) anos
Makefile b9a0be791c 将name改成小写 %!s(int64=4) %!d(string=hai) anos
README.md 478127fa4e init %!s(int64=4) %!d(string=hai) anos
build.sh fa72db8274 配置改为指针 %!s(int64=3) %!d(string=hai) anos
generate.go 478127fa4e init %!s(int64=4) %!d(string=hai) anos
go.mod f674da2e95 feat: 更新相关包 hai 1 ano
go.sum f674da2e95 feat: 更新相关包 hai 1 ano
start.sh 478127fa4e init %!s(int64=4) %!d(string=hai) anos

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