set service name in web

This commit is contained in:
Asim Aslam 2020-04-09 09:41:50 +01:00
parent 1e7cd8c484
commit c1ad6d6c7c

View File

@ -370,6 +370,10 @@ func (s *service) Init(opts ...Option) error {
return nil 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...) s.opts.Service.Init(serviceOpts...)
srv := s.genSrv() srv := s.genSrv()
srv.Endpoints = s.srv.Endpoints srv.Endpoints = s.srv.Endpoints