-
Hi! I have this annoying issue when organizing imports will always prefer slog from Any ideas or tips how to solve this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@jurisevo On VS Code, add this to your {
"gopls": {
"importShortcut": "Definition"
}
} Alternatively, you can remove the experimental package by running |
Beta Was this translation helpful? Give feedback.
@jurisevo
You can handle this in two ways:
On VS Code, add this to your
settings.json
:Alternatively, you can remove the experimental package by running
go get -d golang.org/x/exp/slog@none
followed bygo mod tidy
. This will clean up your dependencies and force the usage of the standard library version fromlog/slog
. Make sure to update your imports fromgolang.org/x/exp/slog
tolog/slog
in your code.