From abefe537ba87de57ad5ce30710c40666dc5fa17c Mon Sep 17 00:00:00 2001 From: Ben Barnard Date: Wed, 8 Mar 2017 15:10:30 +0100 Subject: [PATCH] Correct error message re length of service name The error message had an off-by-one error :) --- nomad/structs/structs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nomad/structs/structs.go b/nomad/structs/structs.go index 560090510..83f05ae0c 100644 --- a/nomad/structs/structs.go +++ b/nomad/structs/structs.go @@ -2267,7 +2267,7 @@ func (s *Service) ValidateName(name string) error { // (https://tools.ietf.org/html/rfc2782). re := regexp.MustCompile(`^(?i:[a-z0-9]|[a-z0-9][a-z0-9\-]{0,61}[a-z0-9])$`) if !re.MatchString(name) { - return fmt.Errorf("service name must be valid per RFC 1123 and can contain only alphanumeric characters or dashes and must be less than 63 characters long: %q", name) + return fmt.Errorf("service name must be valid per RFC 1123 and can contain only alphanumeric characters or dashes and must be no longer than 63 characters: %q", name) } return nil }