lint: Avoid ending the loop on error
Some checks failed
/ golint (push) Failing after 2m47s

Caused by the lint bot, which actually produced another lint error
This commit is contained in:
Eli Ribble 2026-05-19 16:06:41 +00:00
parent 1f798c7521
commit 0a3e70d418
No known key found for this signature in database

View file

@ -192,25 +192,19 @@ func insertFlyover(ctx context.Context, txn bob.Tx, file *models.FileuploadFile,
if err == nil {
setter.Condition = omit.From(condition)
} else {
lint.LogOnErrCtx(func(ctx context.Context) error {
return addError(ctx, txn, c, int32(line_number), int32(i), fmt.Sprintf("'%s' is not a pool condition that we recognize. It should be one of %s", value, poolConditionValidValues()))
}, ctx, "add pool condition error")
addError(ctx, txn, c, int32(line_number), int32(i), fmt.Sprintf("'%s' is not a pool condition that we recognize. It should be one of %s", value, poolConditionValidValues()))
continue
}
case headerFlyoverLatitude:
lat, err = strconv.ParseFloat(value, 10)
lat, err = strconv.ParseFloat(value, 64)
if err != nil {
lint.LogOnErrCtx(func(ctx context.Context) error {
return addError(ctx, txn, c, int32(line_number), int32(i), fmt.Sprintf("'%s' is not decimal value", value))
}, ctx, "add lat error")
addError(ctx, txn, c, int32(line_number), int32(i), fmt.Sprintf("'%s' is not decimal value", value))
continue
}
case headerFlyoverLongitude:
lng, err = strconv.ParseFloat(value, 10)
lng, err = strconv.ParseFloat(value, 64)
if err != nil {
lint.LogOnErrCtx(func(ctx context.Context) error {
return addError(ctx, txn, c, int32(line_number), int32(i), fmt.Sprintf("'%s' is not decimal value", value))
}, ctx, "add lng error")
addError(ctx, txn, c, int32(line_number), int32(i), fmt.Sprintf("'%s' is not decimal value", value))
continue
}
}