Skip to content

fix: limit validation for WithLimitedRuns#893

Merged
JohnRoesler merged 2 commits intogo-co-op:v2from
OsipovMax:fix/limited-runs-zero
Nov 5, 2025
Merged

fix: limit validation for WithLimitedRuns#893
JohnRoesler merged 2 commits intogo-co-op:v2from
OsipovMax:fix/limited-runs-zero

Conversation

@OsipovMax
Copy link
Contributor

What does this do?

Add limit validation for WithLimitedRuns

Which issue(s) does this PR fix/relate to?

Resolves #892

List any changes that modify/break current functionality

  • WithLimitedRuns(0) previously created an unlimited job silently
  • Now returns an error → job creation fails immediately

No breaking change for correct usage (limit ≥ 1 unchanged)
Breaks only invalid config (limit=0) — which was a silent bug before

Have you included tests for your changes?

Yes

Did you document any new/modified functionality?

  • Updated example_test.go
  • Updated README.md

@JohnRoesler JohnRoesler merged commit 46660bb into go-co-op:v2 Nov 5, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] - WithLimitedRuns silently creates an unlimited job

2 participants