fixed pitchfork validation

dev
savik 2021-08-10 12:34:37 +03:00 committed by GitHub
parent 701c999f8a
commit fb18feea76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -49,10 +49,10 @@ func New(payloads map[string]interface{}, payloadType Type, templatePath string)
if payloadType == PitchFork {
var totalLength int
for v := range compiled {
if totalLength != 0 && totalLength != len(v) {
if totalLength != 0 && totalLength != len(compiled[v]) {
return nil, errors.New("pitchfork payloads must be of equal number")
}
totalLength = len(v)
totalLength = len(compiled[v])
}
}
return generator, nil