1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-08-04 21:42:57 +02:00

Update README.md

This commit is contained in:
Asim Aslam
2025-04-25 09:43:41 +01:00
committed by GitHub
parent 280eb5b46d
commit 66c169076c

View File

@ -75,14 +75,16 @@ func (h *Say) Hello(ctx context.Context, req *Request, rsp *Response) error {
return nil
}
// create the service
service := micro.New("helloworld")
func main() {
// create the service
service := micro.New("helloworld")
// register handler
service.Handle(new(Say))
// register handler
service.Handle(new(Say))
// run the service
service.Run()
// run the service
service.Run()
}
```
Optionally set fixed address