fix nil pointer

This commit is contained in:
Asim Aslam 2019-02-01 16:01:51 +00:00
parent c03d935ffd
commit cead99ac44

View File

@ -76,7 +76,7 @@ func addServices(old, neu []*registry.Service) []*registry.Service {
var seen bool var seen bool
for _, o := range old { for _, o := range old {
if o.Version == s.Version { if o.Version == s.Version {
var sp *registry.Service sp := new(registry.Service)
// make copy // make copy
*sp = *o *sp = *o
// set nodes // set nodes