Rename Go Module Refactoring
Upgrade Go modules to newer versions with ease
If you need to change your Go module's name or upgrade it to a new major, then the Rename refactoring has you covered.
Place the cursor under the module name in the go.mod file, then invoke the Refactor this feature, ^T (macOS) / Ctrl+Alt+Shift+T (Windows/Linux).
Select Rename from the list and change the module according to your needs.
You can preview the changes by clicking on the Preview button in the dialog or undo them with Undo operation. You can also undo the change later using the Local history feature.
If you upgrade your module's import path to a new major version, don't forget to tag the release too.