]> Cypherpunks repositories - gostls13.git/commitdiff
database/sql: remove unnecessary types in composite literals
authorElias506 <56119080+Elias506@users.noreply.github.com>
Thu, 25 Mar 2021 14:46:15 +0000 (14:46 +0000)
committerTobias Klauser <tobias.klauser@gmail.com>
Thu, 25 Mar 2021 14:46:50 +0000 (14:46 +0000)
Change-Id: I30c576f826c82cbc62ce28ea7f4886702bd6605d
GitHub-Last-Rev: 2fead200dba13ec74d81e842d8bae97d1e67fcc4
GitHub-Pull-Request: golang/go#42618
Reviewed-on: https://go-review.googlesource.com/c/go/+/270000
Reviewed-by: Daniel Theophanes <kardianos@gmail.com>
Trust: Cherry Zhang <cherryyz@google.com>

src/database/sql/fakedb_test.go

index 1bfd1118aad68b1ae24f207b0b8dcfe49f972631..72e16e05b13e36a7c73b0193c394934ad3a9efea 100644 (file)
@@ -915,7 +915,7 @@ func (s *fakeStmt) QueryContext(ctx context.Context, args []driver.NamedValue) (
                                parentMem: s.c,
                                posRow:    -1,
                                rows: [][]*row{
-                                       []*row{
+                                       {
                                                {
                                                        cols: []interface{}{
                                                                txStatus,
@@ -924,12 +924,12 @@ func (s *fakeStmt) QueryContext(ctx context.Context, args []driver.NamedValue) (
                                        },
                                },
                                cols: [][]string{
-                                       []string{
+                                       {
                                                "tx_status",
                                        },
                                },
                                colType: [][]string{
-                                       []string{
+                                       {
                                                "string",
                                        },
                                },