joao-r-reis commented on code in PR #1889:
URL: 
https://github.com/apache/cassandra-gocql-driver/pull/1889#discussion_r2123744814


##########
session.go:
##########
@@ -454,6 +454,10 @@ func (s *Session) Bind(stmt string, b func(q *QueryInfo) 
([]interface{}, error))
 // Close closes all connections. The session is unusable after this
 // operation.
 func (s *Session) Close() {
+       // Closing a nil session is a non-event, return.
+       if s == nil {

Review Comment:
   I think that whole section is related to checks that the function is already 
performing and deciding whether to return an error or deliberately calling 
`panic()`. I don't see any reference to receiver `nil` checks.
   
   Even in their example they don't check the receiver for `nil`:
   
   ```
   func (e *PathError) Error() string {
       return e.Op + " " + e.Path + ": " + e.Err.Error()
   }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to