fix wrong spells in events.go

This commit is contained in:
ethan 2019-07-24 21:26:09 +08:00 committed by GitHub
parent 030274eba3
commit 72c727e3b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,7 +68,7 @@ func ValidateEvent(event *core.Event) field.ErrorList {
allErrs = append(allErrs, field.Required(field.NewPath("reportingInstance"), "")) allErrs = append(allErrs, field.Required(field.NewPath("reportingInstance"), ""))
} }
if len(event.ReportingInstance) > ReportingInstanceLengthLimit { if len(event.ReportingInstance) > ReportingInstanceLengthLimit {
allErrs = append(allErrs, field.Invalid(field.NewPath("repotingIntance"), "", fmt.Sprintf("can have at most %v characters", ReportingInstanceLengthLimit))) allErrs = append(allErrs, field.Invalid(field.NewPath("reportingInstance"), "", fmt.Sprintf("can have at most %v characters", ReportingInstanceLengthLimit)))
} }
if len(event.Action) == 0 { if len(event.Action) == 0 {
allErrs = append(allErrs, field.Required(field.NewPath("action"), "")) allErrs = append(allErrs, field.Required(field.NewPath("action"), ""))