From 0f58e6b04f9e3ecbc2f76495aecf969769aba5e1 Mon Sep 17 00:00:00 2001 From: Keyi Xie Date: Sat, 9 Jan 2021 10:26:24 +0800 Subject: [PATCH] :pencil: (ScanClose) Add more comment (#106) --- scanner/scanner.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scanner/scanner.go b/scanner/scanner.go index 5205563..cccd165 100644 --- a/scanner/scanner.go +++ b/scanner/scanner.go @@ -189,7 +189,8 @@ func ScanMapClose(rows Rows) ([]map[string]interface{}, error) { } // ScanClose is the same as Scan and helps you Close the rows -// Don't exec the rows.Close after calling this +// Not necessary exec the rows.Close after calling this. +// Close is idempotent and does not affect the result of Err. func ScanClose(rows Rows, target interface{}) error { err := Scan(rows, target) if nil != rows {