Use safer stringVal()

pull/4047/head
Pierre Souchay 7 years ago
parent 9bb15730a6
commit 06a181955d

@ -999,7 +999,7 @@ func (b *Builder) serviceVal(v *ServiceDefinition) *structs.ServiceDefinition {
meta := make(map[string]string)
if err := structs.ValidateMetadata(v.Meta, false); err != nil {
b.err = multierror.Append(fmt.Errorf("invalid meta for service %s: %v", *v.Name, err))
b.err = multierror.Append(fmt.Errorf("invalid meta for service %s: %v", b.stringVal(v.Name), err))
} else {
meta = v.Meta
}

Loading…
Cancel
Save