Kratos

文档地址

源码:https://github.com/go-kratos/kratos
开发手册:https://go-kratos.dev/en/docs/getting-started/start/

安装Kratos

go install github.com/go-kratos/kratos/cmd/kratos/v2@latest && kratos upgrade

helloworld

# create project's layout
kratos new helloworld

cd helloworld
# pull dependencies
go mod download

# generate all codes of proto and wire etc.
go generate ./...

# run the application
kratos run

测试

curl 'http://127.0.0.1:8000/helloworld/kratos'

源码解析

猜你喜欢

转载自blog.csdn.net/qq_39049011/article/details/125049074