diff pkg/imports/queue.go @ 1328:d753ce6cf588

To make golint happier made context.Context to be the first argument in all calls.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Sun, 25 Nov 2018 16:26:41 +0100
parents cabf4789e02b
children 0e1d89241cda
line wrap: on
line diff
--- a/pkg/imports/queue.go	Sun Nov 25 15:56:07 2018 +0100
+++ b/pkg/imports/queue.go	Sun Nov 25 16:26:41 2018 +0100
@@ -36,7 +36,7 @@
 	}
 
 	Job interface {
-		Do(int64, context.Context, *sql.Conn, Feedback) error
+		Do(context.Context, int64, *sql.Conn, Feedback) error
 		CleanUp() error
 	}
 
@@ -45,7 +45,7 @@
 	JobCreator interface {
 		Create(kind JobKind, data string) (Job, error)
 		Depends() []string
-		StageDone(*sql.Tx, context.Context, int64) error
+		StageDone(context.Context, *sql.Tx, int64) error
 	}
 
 	idJob struct {
@@ -374,7 +374,7 @@
 				ctx := context.Background()
 				return auth.RunAs(ctx, idj.user,
 					func(conn *sql.Conn) error {
-						return job.Do(idj.id, ctx, conn, feedback)
+						return job.Do(ctx, idj.id, conn, feedback)
 					})
 			})()
 			if errDo != nil {