BewareMyPower commented on code in PR #1338:
URL: https://github.com/apache/pulsar-client-go/pull/1338#discussion_r1972826779


##########
pulsar/producer_partition.go:
##########
@@ -846,6 +848,21 @@ type pendingItem struct {
        flushCallback func(err error)
 }
 
+func (i *pendingItem) done(err error) {

Review Comment:
   > the methods of a struct is better to be close together with its defintion,
   
   It depends. However, moving the method's position breaks the git change log 
and makes code harder to review. It should really be avoided without strong 
reason. For example, your change here only adds 3 lines, but from the diff of 
this PR, you deleted 11 lines and added 14 lines.
   
   Imagine what if I only want to add 1 line to a method, but I actually 
removed 100 lines and added 101 lines where 100 lines are duplicated.
   
   > even if the best IDE goland can't jump to the methods' definitions.
   
   I tried moving `done` back to the original position (before `_setConn`). 
Then I searched all references and jumped from one reference to the 
implementation, the LSP worked well.
   
   If the so-called "best" IDE is so poor, I suggest switching to 
[vim-go](https://github.com/fatih/vim-go) for development.
   
   
https://github.com/user-attachments/assets/96cefff5-0632-48d6-85be-83e5d28e3d80
   
   
   



-- 
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]

Reply via email to