tjons commented on code in PR #1889:
URL: 
https://github.com/apache/cassandra-gocql-driver/pull/1889#discussion_r2083667554


##########
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:
   @tolbertam thanks for your feedback... I agree, I think there's a lot of 
opportunity to clean up this behavior in general. I had to resist the urge to 
boil the ocean and fix everything :sweat_smile:. Personally, I think I'd 
advocate for generally nil-guarding, returning an error to the user in most 
cases, and saving panics for when absolutely necessary. 
   
   Unfortunately, that is a breaking signature change and as you said, 
challenging to handle without a major release. I'm new to the project but I've 
seen some discussion in slack about @joao-r-reis working on a v2 release... 
@joao-r-reis have you thought about potentially revisiting the API of the 
driver before committing to a v2 major version and the associated support 
commitments? There are a number of other things that might be interesting to 
consider in spirit of being more idomatic for Go developers, such as a more 
modular package structure. I'm using this client a lot and happy to write more 
about my experiences so far. 



-- 
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: pr-unsubscr...@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org
For additional commands, e-mail: pr-h...@cassandra.apache.org

Reply via email to