From fd53963afbb64b9bb0d2a9040cac3608156d325c Mon Sep 17 00:00:00 2001 From: James Rasell Date: Fri, 4 Dec 2020 09:49:31 +0100 Subject: [PATCH] core: fix typo msg used when job ID/name contains a null char. --- nomad/structs/structs.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nomad/structs/structs.go b/nomad/structs/structs.go index 95963af11..586e373b0 100644 --- a/nomad/structs/structs.go +++ b/nomad/structs/structs.go @@ -4046,12 +4046,12 @@ func (j *Job) Validate() error { } else if strings.Contains(j.ID, " ") { mErr.Errors = append(mErr.Errors, errors.New("Job ID contains a space")) } else if strings.Contains(j.ID, "\000") { - mErr.Errors = append(mErr.Errors, errors.New("Job ID contains a null chararacter")) + mErr.Errors = append(mErr.Errors, errors.New("Job ID contains a null character")) } if j.Name == "" { mErr.Errors = append(mErr.Errors, errors.New("Missing job name")) } else if strings.Contains(j.Name, "\000") { - mErr.Errors = append(mErr.Errors, errors.New("Job Name contains a null chararacter")) + mErr.Errors = append(mErr.Errors, errors.New("Job Name contains a null character")) } if j.Namespace == "" { mErr.Errors = append(mErr.Errors, errors.New("Job must be in a namespace"))