From c5468f3037512285cc1d20ba4ca4bd454ac3b91e Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Mon, 15 Feb 2016 12:36:48 -0600 Subject: [PATCH] Fix go vet identified composite leteral uses unkeyed fields --- hstore_test.go | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/hstore_test.go b/hstore_test.go index 445d9ba5..dba5206b 100644 --- a/hstore_test.go +++ b/hstore_test.go @@ -85,23 +85,23 @@ func TestNullHstoreTranscode(t *testing.T) { {pgx.NullHstore{}, "null"}, {pgx.NullHstore{Valid: true}, "empty"}, {pgx.NullHstore{ - Hstore: map[string]pgx.NullString{"foo": pgx.NullString{"bar", true}}, + Hstore: map[string]pgx.NullString{"foo": pgx.NullString{String: "bar", Valid: true}}, Valid: true}, "single key/value"}, {pgx.NullHstore{ - Hstore: map[string]pgx.NullString{"foo": pgx.NullString{"bar", true}, "baz": pgx.NullString{"quz", true}}, + Hstore: map[string]pgx.NullString{"foo": pgx.NullString{String: "bar", Valid: true}, "baz": pgx.NullString{String: "quz", Valid: true}}, Valid: true}, "multiple key/values"}, {pgx.NullHstore{ - Hstore: map[string]pgx.NullString{"NULL": pgx.NullString{"bar", true}}, + Hstore: map[string]pgx.NullString{"NULL": pgx.NullString{String: "bar", Valid: true}}, Valid: true}, `string "NULL" key`}, {pgx.NullHstore{ - Hstore: map[string]pgx.NullString{"foo": pgx.NullString{"NULL", true}}, + Hstore: map[string]pgx.NullString{"foo": pgx.NullString{String: "NULL", Valid: true}}, Valid: true}, `string "NULL" value`}, {pgx.NullHstore{ - Hstore: map[string]pgx.NullString{"foo": pgx.NullString{"", false}}, + Hstore: map[string]pgx.NullString{"foo": pgx.NullString{String: "", Valid: false}}, Valid: true}, `NULL value`}, } @@ -120,36 +120,36 @@ func TestNullHstoreTranscode(t *testing.T) { } for _, sst := range specialStringTests { tests = append(tests, test{pgx.NullHstore{ - Hstore: map[string]pgx.NullString{sst.input + "foo": pgx.NullString{"bar", true}}, + Hstore: map[string]pgx.NullString{sst.input + "foo": pgx.NullString{String: "bar", Valid: true}}, Valid: true}, "key with " + sst.description + " at beginning"}) tests = append(tests, test{pgx.NullHstore{ - Hstore: map[string]pgx.NullString{"foo" + sst.input + "foo": pgx.NullString{"bar", true}}, + Hstore: map[string]pgx.NullString{"foo" + sst.input + "foo": pgx.NullString{String: "bar", Valid: true}}, Valid: true}, "key with " + sst.description + " in middle"}) tests = append(tests, test{pgx.NullHstore{ - Hstore: map[string]pgx.NullString{"foo" + sst.input: pgx.NullString{"bar", true}}, + Hstore: map[string]pgx.NullString{"foo" + sst.input: pgx.NullString{String: "bar", Valid: true}}, Valid: true}, "key with " + sst.description + " at end"}) tests = append(tests, test{pgx.NullHstore{ - Hstore: map[string]pgx.NullString{sst.input: pgx.NullString{"bar", true}}, + Hstore: map[string]pgx.NullString{sst.input: pgx.NullString{String: "bar", Valid: true}}, Valid: true}, "key is " + sst.description}) tests = append(tests, test{pgx.NullHstore{ - Hstore: map[string]pgx.NullString{"foo": pgx.NullString{sst.input + "bar", true}}, + Hstore: map[string]pgx.NullString{"foo": pgx.NullString{String: sst.input + "bar", Valid: true}}, Valid: true}, "value with " + sst.description + " at beginning"}) tests = append(tests, test{pgx.NullHstore{ - Hstore: map[string]pgx.NullString{"foo": pgx.NullString{"bar" + sst.input + "bar", true}}, + Hstore: map[string]pgx.NullString{"foo": pgx.NullString{String: "bar" + sst.input + "bar", Valid: true}}, Valid: true}, "value with " + sst.description + " in middle"}) tests = append(tests, test{pgx.NullHstore{ - Hstore: map[string]pgx.NullString{"foo": pgx.NullString{"bar" + sst.input, true}}, + Hstore: map[string]pgx.NullString{"foo": pgx.NullString{String: "bar" + sst.input, Valid: true}}, Valid: true}, "value with " + sst.description + " at end"}) tests = append(tests, test{pgx.NullHstore{ - Hstore: map[string]pgx.NullString{"foo": pgx.NullString{sst.input, true}}, + Hstore: map[string]pgx.NullString{"foo": pgx.NullString{String: sst.input, Valid: true}}, Valid: true}, "value is " + sst.description}) }