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:
14
README.md
14
README.md
@ -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
|
||||
|
Reference in New Issue
Block a user