You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/07/17 06:38:47 UTC

[GitHub] [pulsar-client-go] wolfstudy opened a new issue #22: Judge interface is nil?

wolfstudy opened a new issue #22: Judge interface is nil? 
URL: https://github.com/apache/pulsar-client-go/issues/22
 
 
   #### Expected behavior
   
   In go language, the interface contains two parts:
   
   - ptr
   - value
   
   This interface is nil only if they are all nil. So in the go language, we can't tell if an interface is nil.
   
   In [impl_producer.go#L95](https://github.com/apache/pulsar-client-go/blob/master/pulsar/impl_producer.go#L95)
   
   ```	
   for _, producer := range p.producers {
   	if producer != nil {
   		_ = producer.Close()
   	}
   }
   ```
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services