Nincs leírás

dcsunny 8e3a5a259a init 3 éve
cmd 8e3a5a259a init 3 éve
configs 8e3a5a259a init 3 éve
internal 8e3a5a259a init 3 éve
.gitignore 8e3a5a259a init 3 éve
Dockerfile 8e3a5a259a init 3 éve
Jenkinsfile 8e3a5a259a init 3 éve
LICENSE 8e3a5a259a init 3 éve
Makefile 8e3a5a259a init 3 éve
README.md 8e3a5a259a init 3 éve
build.sh 8e3a5a259a init 3 éve
generate.go 8e3a5a259a init 3 éve
go.mod 8e3a5a259a init 3 éve
go.work.build 8e3a5a259a init 3 éve
start.sh 8e3a5a259a init 3 éve

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