aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Appel <jeanpierre.appel01@gmail.com>2025-06-30 19:09:56 -0400
committerJP Appel <jeanpierre.appel01@gmail.com>2025-06-30 19:09:56 -0400
commitd339148c514896bb4a1c49e9320091c0c5a4934b (patch)
tree904e02d7a38f988da1a9e6b90c4b8ad5744a853c
parenta4d86693394ba9b181b5928c1c6e8c31c9bb2b64 (diff)
Fix shadowing of nil pointer
-rw-r--r--pkg/data/get.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/data/get.go b/pkg/data/get.go
index 968789b..09d4587 100644
--- a/pkg/data/get.go
+++ b/pkg/data/get.go
@@ -99,7 +99,8 @@ func (f *Fill) document(ctx context.Context) error {
// pass nil rows to get all documents in the database.
func (f *FillMany) documents(ctx context.Context, rows *sql.Rows) error {
if rows == nil {
- rows, err := f.Db.QueryContext(ctx, `
+ var err error
+ rows, err = f.Db.QueryContext(ctx, `
SELECT id, path, title, date, fileTime, meta
FROM Documents
`)