From 78c9aea714d4397613f52f720bce56638758f212 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=87=95=E9=A3=9E=20=E6=A2=81?= <397419@qq.com> Date: Mon, 30 Oct 2023 15:42:10 +0800 Subject: [PATCH] Update postgres.go run the Go formatting tool (gofumpt). --- bindings/postgres/postgres.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bindings/postgres/postgres.go b/bindings/postgres/postgres.go index 0f20c052b3..d6e3bdeda3 100644 --- a/bindings/postgres/postgres.go +++ b/bindings/postgres/postgres.go @@ -186,7 +186,7 @@ func (p *Postgres) query(ctx context.Context, sql string, args ...any) (result [ return nil, fmt.Errorf("error executing query: %w", err) } - cols := rows.FieldDescriptions() + cols := rows.FieldDescriptions() rs := make([]any, 0) for rows.Next() { @@ -194,12 +194,12 @@ func (p *Postgres) query(ctx context.Context, sql string, args ...any) (result [ if rowErr != nil { return nil, fmt.Errorf("error reading result '%v': %w", rows.Err(), rowErr) } - + r := map[string]interface{}{} for i, col := range cols { r[string(col.Name)] = val[i] } - + rs = append(rs, r) //nolint:asasalint }