Mercurial > gemma
diff pkg/imports/sr.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 | 5443f5c9154c |
children | 785f14264426 |
line wrap: on
line diff
--- a/pkg/imports/sr.go Sun Nov 25 15:56:07 2018 +0100 +++ b/pkg/imports/sr.go Sun Nov 25 16:26:41 2018 +0100 @@ -80,8 +80,8 @@ } func (srJobCreator) StageDone( + ctx context.Context, tx *sql.Tx, - ctx context.Context, id int64, ) error { _, err := tx.ExecContext(ctx, srStageDoneSQL, id) @@ -165,8 +165,8 @@ } func (sr *SoundingResult) Do( + ctx context.Context, importID int64, - ctx context.Context, conn *sql.Conn, feedback Feedback, ) error { @@ -188,7 +188,7 @@ return err } - if err := m.Validate(conn, ctx); err != nil { + if err := m.Validate(ctx, conn); err != nil { return common.ToError(err) } @@ -241,7 +241,7 @@ feedback.Info("Triangulate...") start = time.Now() - tin, err := octree.GenerateTinByID(conn, ctx, id, epsg) + tin, err := octree.GenerateTinByID(ctx, conn, id, epsg) feedback.Info("triangulation took %s", time.Since(start)) if err != nil { return err @@ -285,7 +285,7 @@ } // Store for potential later removal. - if err = track(tx, ctx, importID, "waterway.sounding_results", id); err != nil { + if err = track(ctx, tx, importID, "waterway.sounding_results", id); err != nil { return err }