Add missed service name of the error message for the invalid port

This commit is contained in:
Kenjiro Nakayama 2016-07-20 20:41:24 +09:00
parent 3cd8d9d84e
commit c24e886a5f

View file

@ -1669,7 +1669,7 @@ func (s *Service) Validate() error {
for _, c := range s.Checks { for _, c := range s.Checks {
if s.PortLabel == "" && c.RequiresPort() { if s.PortLabel == "" && c.RequiresPort() {
mErr.Errors = append(mErr.Errors, fmt.Errorf("check %s invalid: check requires a port but the service %+q has no port", c.Name)) mErr.Errors = append(mErr.Errors, fmt.Errorf("check %s invalid: check requires a port but the service %+q has no port", c.Name, s.Name))
continue continue
} }