First returns an updated filter set that will only return the first count jobs. Count must be between 1 and 10_000, inclusive, or this will panic.
(count int)
| 311 | // |
| 312 | // Count must be between 1 and 10_000, inclusive, or this will panic. |
| 313 | func (p *JobListParams) First(count int) *JobListParams { |
| 314 | if count <= 0 { |
| 315 | panic("count must be > 0") |
| 316 | } |
| 317 | if count > 10_000 { |
| 318 | panic("count must be <= 10_000") |
| 319 | } |
| 320 | paramsCopy := p.copy() |
| 321 | paramsCopy.limit = int32(count) |
| 322 | return paramsCopy |
| 323 | } |
| 324 | |
| 325 | // IDs returns an updated filter set that will only return jobs with the given |
| 326 | // IDs. |