wolfstudy commented on code in PR #734:
URL: https://github.com/apache/pulsar-client-go/pull/734#discussion_r849052252


##########
pulsar/internal/topic_name.go:
##########
@@ -107,6 +107,9 @@ func ParseTopicName(topic string) (*TopicName, error) {
 }
 
 func TopicNameWithoutPartitionPart(tn *TopicName) string {
+       if tn == nil {
+               return ""
+       }

Review Comment:
   
![image](https://user-images.githubusercontent.com/20965307/163097738-10134c2f-7575-461d-9aef-e29b2f41fe6f.png)
   
   
   Rather than dealing with the tn ==nil case here, I prefer here that we don't 
ignore err, or check both



-- 
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: commits-unsubscr...@pulsar.apache.org

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

Reply via email to