From d0b968ac8b0f8bae7ad10239add06bfba33a2616 Mon Sep 17 00:00:00 2001 From: Thomas Miller Date: Mon, 4 Dec 2023 09:24:56 +1000 Subject: [PATCH] Fixes example test with map ordering. --- internal/database/statement_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/database/statement_test.go b/internal/database/statement_test.go index 41c5e922e25..8a21b646ef4 100644 --- a/internal/database/statement_test.go +++ b/internal/database/statement_test.go @@ -126,7 +126,7 @@ func (s *statementSuite) TestMapToMultiPlaceholder(c *gc.C) { } func ExampleMapToMultiPlaceholderTransform() { - myMap := map[string]string{"one": "two", "three": "four"} + myMap := map[string]string{"one": "two"} bindStmt, args := MapToMultiPlaceholderTransform(myMap, func(k, v string) []any { return []any{"staticvalue", k, v} }) @@ -134,8 +134,8 @@ func ExampleMapToMultiPlaceholderTransform() { fmt.Println(bindStmt) fmt.Println(args) // Output: - // (?,?,?),(?,?,?) - // [staticvalue one two staticvalue three four] + // (?,?,?) + // [staticvalue one two] } // TestMapToMultiPlaceholderTransformNoVals is testing that if the transform