Sem descrição

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

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