From 11428bbc02a720cf612d528ae07ab7aa8422ba18 Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Thu, 2 Jul 2020 18:35:47 -0500 Subject: [PATCH] Document methods on Rows allowed to be called after Close() --- rows.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rows.go b/rows.go index c63f1d9b..5f4fb099 100644 --- a/rows.go +++ b/rows.go @@ -16,6 +16,8 @@ import ( // the *Conn can be used again. Rows are closed by explicitly calling Close(), // calling Next() until it returns false, or when a fatal error occurs. // +// Once a Rows is closed the only methods that may be called are Close(), Err(), and CommandTag(). +// // Rows is an interface instead of a struct to allow tests to mock Query. However, // adding a method to an interface is technically a breaking change. Because of this // the Rows interface is partially excluded from semantic version requirements.