Skip to content

Commit

Permalink
📝 (ScanClose) Add more comment (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiekeyi98 authored Jan 9, 2021
1 parent 258b19d commit 0f58e6b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scanner/scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 0f58e6b

Please sign in to comment.