GoLand 2024.1 Help

Migrating from Visual Studio Code to GoLand

This guide aims to provide a transition plan for developers moving from Visual Studio Code to GoLand.

Visual Studio Code (VS Code) is a widely used, lightweight, and flexible editor that supports a multitude of programming languages, including Go through extensions. It is favored for its simplicity, extensive plugin ecosystem, and community support. GoLand is a specialized Integrated Development Environment (IDE) from JetBrains, designed specifically for the Go language. GoLand offers comprehensive tools and features such as intelligent code completion, ergonomic design, and integrated debugging tools that enhance Go development.

Contents of the current guide

This guide covers the following topics:

  • Preparing for migration: before migrating from Visual Studio Code to GoLand, back up all projects and configurations to prevent data loss and allow restoration to the original setup if needed.

  • Installing and configuring GoLand: to install and configure GoLand, use the JetBrains Toolbox App for easy management of multiple product installations, updates, and version rollbacks. After installation, configure the Go SDK by selecting either a local copy or downloading directly from GoLand's settings. Additionally, you can customize the IDE by setting up a preferred keymap, such as the VS Code keymap, and installing plugins from the JetBrains Marketplace to enhance functionality.

  • Differences in user interfaces: when transitioning from Visual Studio Code to GoLand, you will notice differences in their user interfaces. This topic describes the most noticeable of them.

  • Differences in workflows: this section outlines the workflow differences between the two IDEs. For example, with GoLand, you have no need for a manual save shortcut, as the IDE automatically saves your work based on specific triggers, such as closing a file or changing the IDE's focus.

Why migrate to GoLand?

Consider the following reasons when deciding to migrate to GoLand:

  1. Bundled debugger: GoLand integrates a powerful debugger directly within the IDE, eliminating the need to configure external JSON files that is a common requirement in VS Code.

  2. Full-line code completion: AI-powered code completion that is completely free and runs locally without sending any data over the internet.

  3. Refactoring options: GoLand offers refactoring capabilities, which are tailored specifically for Go developers. Refactoring tools include:

    • Rename: safely changes variable names, functions, and package names throughout your entire project.

    • Change signature: modifies function signatures with automatic correction of all call sites.

    • Extract refactorings: turns chunks of code into reusable methods, making your code more readable and maintainable.

    • Inline: replaces redundant method calls with the actual method content when more straightforward code is preferable.

    • Move: relocates functions, methods, or types to different packages or files to improve the project structure.

    • Safe delete: removes elements safely by checking for existing usages and dependencies.

  4. Terraform plugin: for developers working with infrastructure as code, GoLand's Terraform plugin is exceptionally robust. This plugin supports advanced code editing features, code generation, and live templates specific to Terraform, providing an enriched coding experience. For more information about the Terraform plugin, refer to Terraform.

  5. Intentions and quick-fixes: GoLand intentions and quick-fixes dramatically enhance coding productivity. These features suggest on-the-fly improvements and optimizations such as converting a loop into a map or filter operation, implementing interface methods with stubs, or transforming variable types based on context. This intelligent assistance helps to maintain code quality and adhere to best practices without the manual effort typically involved.

To see a list of features, please refer to the Features page at jetbrains.com.

Last modified: 02 May 2024