zeromicro / go-zero-demo Goto Github PK
View Code? Open in Web Editor NEWthe source code of the go-zero-doc
the source code of the go-zero-doc
internal/handler/greethandler.go:11:2: httpx redeclared in this block
internal/handler/greethandler.go:6:2: other declaration of httpx
internal/handler/greethandler.go:11:2: imported and not used: "github.com/zeromicro/go-zero/rest/httpx"
$ go run order.go -f etc/order.yaml
2023/04/22 18:26:09 rpc dial: etcd://127.0.0.1:2379/user.rpc, error: context deadline exceeded, make sure rpc service "user.rpc" is already started
exit status 1
启动order服务的时候报错如下,请问如何解决?
参考https://go-zero.dev/cn/monolithic-service.html修改logic,执行报错
func (l *GreetLogic) Greet(req types.Request) (*types.Response, error) {
return &types.Response{
Message: "Hello go-zero",
}, nil
}
PS D:\repo\go-zero-demo\greet> go run greet.go -f etc/greet-api.yaml
# go-zero-demo/greet/internal/handler
internal\handler\greethandler.go:21:24: cannot use &req (type *types.Request) as type types.Request in argument to l.Greet
改为下边之后,就正常了:
func (l *GreetLogic) Greet(req *types.Request) (resp *types.Response, err error) {
return &types.Response{
Message: "Hello go-zero",
}, nil
}
请问是我go版本什么的不对吗?
快速开发-微服务——订单服务和用户服务
https://go-zero.dev/cn/micro-service.html
实例教程并没有给出userclient哪来的,源代码直接空降,小白有些懵逼,求指教
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.