Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistently prefer job param name to j #69

Merged
merged 1 commit into from
Nov 26, 2023
Merged

Conversation

brandur
Copy link
Contributor

@brandur brandur commented Nov 26, 2023

When using a job parameter name for a worker, we weren't consistent
about whether to use j or job and have mixed convention all over the
place:

func (w *Worker) Work(ctx context.Context, j *river.Job[ErroringArgs]) error {
func (w *Worker) Work(ctx context.Context, job *river.Job[ErroringArgs]) error {

Generally in non-core-team Go, a convention of more than single
character variable names is preferred except in specific cases (e.g.
i), so here, move everything over to use the more explicit job.

@brandur brandur requested a review from bgentry November 26, 2023 16:23
When using a job parameter name for a worker, we weren't consistent
about whether to use `j` or `job` and have mixed convention all over the
place:

    func (w *Worker) Work(ctx context.Context, j *river.Job[ErroringArgs]) error {
    func (w *Worker) Work(ctx context.Context, job *river.Job[ErroringArgs]) error {

Generally in non-core-team Go, a convention of more than single
character variable names is preferred except in specific cases (e.g.
`i`), so here, move everything over to use the more explicit `job`.
@bgentry bgentry force-pushed the brandur-job-param-name branch from 64f3d36 to b511803 Compare November 26, 2023 16:45
@bgentry bgentry merged commit 724cefc into master Nov 26, 2023
7 checks passed
@bgentry bgentry deleted the brandur-job-param-name branch November 26, 2023 16:54
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.

2 participants