Nenhuma descrição

lihf 97ef6c762f feat: 支持etcd 3 meses atrás
cmd 97ef6c762f feat: 支持etcd 3 meses atrás
configs 8e3a5a259a init 3 anos atrás
internal 97ef6c762f feat: 支持etcd 3 meses atrás
.gitignore 8e3a5a259a init 3 anos atrás
Dockerfile 4a423df758 fix: 升级docker镜像,升级go.mod引用的包 1 ano atrás
LICENSE 8e3a5a259a init 3 anos atrás
Makefile 8e3a5a259a init 3 anos atrás
README.md 8e3a5a259a init 3 anos atrás
build.sh 97ef6c762f feat: 支持etcd 3 meses atrás
generate.go af7fbe835a init 3 anos atrás
go.mod 97ef6c762f feat: 支持etcd 3 meses atrás
go.sum 97ef6c762f feat: 支持etcd 3 meses atrás
start.sh 8e3a5a259a init 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