بدون توضیح

dcsunny 782a619e03 fix: 使用了redis的都会自动添加used_by,这样更好的知道是哪个项目在使用 10 ماه پیش
cmd 782a619e03 fix: 使用了redis的都会自动添加used_by,这样更好的知道是哪个项目在使用 10 ماه پیش
configs 8e3a5a259a init 3 سال پیش
internal 782a619e03 fix: 使用了redis的都会自动添加used_by,这样更好的知道是哪个项目在使用 10 ماه پیش
.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 782a619e03 fix: 使用了redis的都会自动添加used_by,这样更好的知道是哪个项目在使用 10 ماه پیش
generate.go af7fbe835a init 3 سال پیش
go.mod 782a619e03 fix: 使用了redis的都会自动添加used_by,这样更好的知道是哪个项目在使用 10 ماه پیش
go.sum 782a619e03 fix: 使用了redis的都会自动添加used_by,这样更好的知道是哪个项目在使用 10 ماه پیش
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