rs / zerolog

Zero Allocation JSON Logger
MIT License
10.61k stars 572 forks source link

Question: is there a way to tweak gopls "organize imports" so that when I use the zerolog logger in my code, it imports the right package? #683

Closed nchelluri closed 5 days ago

nchelluri commented 2 months ago

Simply, every time I write something like

log.Info().Msg("Hello, world")

and github.com/rs/zerolog/log is not yet imported, and I save my code file, then gopls will think that I mean github.com/pingcap/log instead. Do others encounter this issue, and is there a way around it?

Thank you for your work on this library.

nchelluri commented 5 days ago

I am not sure what happened but somewhere in the last little while this stopped being an issue for me. Maybe it was a gopls version upgrade, not sure.