From 66c169076cf3151ffd7a086f04da8132ed86b5ce Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Fri, 25 Apr 2025 09:43:41 +0100 Subject: [PATCH] Update README.md --- README.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3ac8a82b..18cca9b6 100644 --- a/README.md +++ b/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