From c1ad6d6c7c112b9afdf80dc38a73f0a25f550234 Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Thu, 9 Apr 2020 09:41:50 +0100 Subject: [PATCH] set service name in web --- web/service.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/service.go b/web/service.go index cff7e113..069a53e2 100644 --- a/web/service.go +++ b/web/service.go @@ -370,6 +370,10 @@ func (s *service) Init(opts ...Option) error { return nil })) + // pass in own name and version + serviceOpts = append(serviceOpts, micro.Name(s.opts.Name)) + serviceOpts = append(serviceOpts, micro.Version(s.opts.Version)) + s.opts.Service.Init(serviceOpts...) srv := s.genSrv() srv.Endpoints = s.srv.Endpoints