暫無描述

dcsunny 4a423df758 fix: 升级docker镜像,升级go.mod引用的包 1 年之前
cmd 50afa32118 update 3 年之前
configs 8e3a5a259a init 3 年之前
internal b37fe8547d fix: GrpcValue 中 userAgent 判空有误 1 年之前
.gitignore 8e3a5a259a init 3 年之前
Dockerfile 4a423df758 fix: 升级docker镜像,升级go.mod引用的包 1 年之前
LICENSE 8e3a5a259a init 3 年之前
Makefile 8e3a5a259a init 3 年之前
README.md 8e3a5a259a init 3 年之前
build.sh 8e3a5a259a init 3 年之前
generate.go af7fbe835a init 3 年之前
go.mod 4a423df758 fix: 升级docker镜像,升级go.mod引用的包 1 年之前
go.sum 4a423df758 fix: 升级docker镜像,升级go.mod引用的包 1 年之前
start.sh 8e3a5a259a init 3 年之前

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