changeset 2668:0fcf80a413a2 import-overview-rework

Fixed indexing of arguments.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 14 Mar 2019 16:07:44 +0100
parents 5ece2c51d1f0
children 831129a27536
files pkg/controllers/importqueue.go
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pkg/controllers/importqueue.go	Thu Mar 14 15:51:43 2019 +0100
+++ b/pkg/controllers/importqueue.go	Thu Mar 14 16:07:44 2019 +0100
@@ -139,7 +139,11 @@
 	)
 
 	arg := func(format string, v ...interface{}) {
-		fmt.Fprintf(&stmt, format, len(args)+1)
+		indices := make([]interface{}, len(v))
+		for i := range indices {
+			indices[i] = len(args) + i + 1
+		}
+		fmt.Fprintf(&stmt, format, indices...)
 		args = append(args, v...)
 	}