On Sun, Oct 20, 2024 at 12:15 PM Himanshu Balurkar <himanshubalurka...@gmail.com> wrote: > > https://github.com/golang/net/blob/5716b9813d2c78aa3bb6e08160517facfb2e84e6/internal/socks/socks.go#L233-L245 > > At the above link, the address string argument in the validateTarget function > is not used anywhere. Unclear why the parameter is there. It is not for the > interface satisfaction. > > It might be the case that the address string argument is placed there > intentionally for some future plans/modifications. > > It might also be the case that this is overlooked. > > Anyways, is this issue worth fixing or not? The simple fix would be to remove > that argument. > > Is there anything that I am missing? Highly appreciate any leads!
It was most likely just an oversight in the initial commit (https://go.dev/cl/110135). It could be fixed, but most fixes of this sort are code churn. As a general guideline, changes to working code can only break it. We should only make such changes if there is a clear reason to do so. An unused parameter is not the worst reason, but it's not the best one either. Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAOyqgcUjZshah4m6X1hGdQNnC-K3V2zyROdnNoBR8kWJ8wpmJA%40mail.gmail.com.