Bez popisu

lihf c751549bcc feat: etcd client 补上 close před 8 měsíci
cmd c751549bcc feat: etcd client 补上 close před 8 měsíci
configs 8e3a5a259a init před 3 roky
internal 3833b34e95 feat: etcd kratos client换个包 před 8 měsíci
.gitignore 8e3a5a259a init před 3 roky
Dockerfile 4a423df758 fix: 升级docker镜像,升级go.mod引用的包 před 1 rokem
LICENSE 8e3a5a259a init před 3 roky
Makefile 8e3a5a259a init před 3 roky
README.md 8e3a5a259a init před 3 roky
build.sh d35348964a feat: etcd做服务发现和配置中心 před 8 měsíci
generate.go af7fbe835a init před 3 roky
go.mod 3833b34e95 feat: etcd kratos client换个包 před 8 měsíci
go.sum 3833b34e95 feat: etcd kratos client换个包 před 8 měsíci
start.sh 8e3a5a259a init před 3 roky

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