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.


Related Resources

Introduce Parameters from Unresolved References in your Code
Introduce Parameters from Unresolved References in your Code
Change a function or method signature by introducing parameters directly from unresolved references
Create a Function in Another Package
Create a Function in Another Package
Type a non-existing function name and generate its implementation in a package of your choice.
Empower your `Printf`-like functions with coding assistance
Empower your `Printf`-like functions with coding assistance
Provide hints and highlights for message formats in custom `Printf`-like functions.