1. How does your code work?
Before installing the tools, it is important to understand how Go code is executed. If you have previously studied languages like Java, Kotlin, or C#, you know that their code is first compiled into intermediate bytecode, which is then executed by a special virtual machine (JVM, CLR).
In Go, the approach is fundamentally different. The Go compiler converts your source code directly into machine code (native binary), specific to a particular operating system and processor architecture (Windows/x64, Linux/ARM, etc.).
graph LR
A[Your .go code] -->|Go Compiler| B[Machine code]
B -->|Build| C[Executable binary file]
C -->|Run| D[Operating system]
style C fill:#f9f,stroke:#333,stroke-width:2px
But where is the garbage collector?
Go is a language with automatic memory management. The Garbage Collector, goroutine scheduler, and other service mechanisms form the Go Runtime. During compilation, this Runtime is simply "embedded" inside your final binary file. This is exactly why Go programs run fast and do not require installing additional platforms (runtime environments) on the server to run.
2. What are Go SDK and GOROOT
In order to turn source code into an executable file, your IDE needs a set of tools — the Go SDK (often called the Go toolchain).
The Go SDK is a directory on your computer that contains:
- Utilities for compiling and building: go build, go run.
- Formatting and testing tools: gofmt, go test.
- The Standard Library. The source code of packages like fmt, strconv, math, and hundreds of others.
The root folder where the Go SDK is installed is called GOROOT in the language's terminology. The IDE uses GOROOT as the "source of truth". If the SDK is not connected, the IDE does not understand the syntax of the current language version, and an attempt to write import "fmt" will be underlined in red because the environment doesn't know where to look for this package.
3. Installing JetBrains GoLand
Official JetBrains website: https://www.jetbrains.com/go/download/
On the download page, the site will automatically detect your OS. Please note that you are downloading the full-featured version, which can be used during a Trial period or with a student license.
Installation on Windows
- Download the
.exeinstaller (select your processor architecture: x64 or ARM64). - Run the installer. At the Installation Options step, it is recommended to check the following options:
- Create Desktop Shortcut: create a shortcut on your desktop.
- Update PATH variable: add the IDE path to the system variables (useful for working with the terminal).
- Update Context Menu -> Add "Open Folder as Project": adds a convenient feature to open any folder as a project via the right mouse button.
- Wait for the installation to finish.
Installation on macOS
- Download the
.dmgfile. Attention: choose the correct chip!- Apple Silicon M1, M2, M3... — for modern Macs.
- Intel — for older models.
- Open the file and drag the GoLand icon into the Applications folder.
Installation on Linux
- Download the
.tar.gzarchive. - Extract the archive to a convenient directory, for example,
~/programs/goland. - Go to the
binfolder and run the script:./goland.sh - For convenience, you can create a shortcut via the IDE menu itself: Tools -> Create Desktop Entry.
4. First Launch and Configuration
After installation, the IDE will offer to import settings from previous versions. If you are installing the development environment for the first time, choose Skip import.
After selecting the import settings, the license management window will open.
To start working without purchasing a paid subscription, go to the Start trial tab and click the blue Start Free 30-Day Trial button.
To activate the trial period, you will need a JetBrains account. If you don't have an account yet, the system will redirect you to the website to create one. Complete a short registration, log into the IDE with the created profile, and your 30-day license will be successfully activated.
Welcome Screen
After activation, the updated GoLand welcome screen will open. The interface here is logically divided into several zones:
- Left Panel - Projects and Files. The main menu to start working. Here you can open a folder with existing code (Open...), create a project from scratch (New...), or pull a repository from GitHub (Clone Repository...). Below this, a list of all your recent projects will be formed for quick access.
- Right Panel - Welcome to GoLand. A workspace with quick access to popular environment tools (Terminal, Docker, Database, and plugins), as well as a banner with information about updates "What's New in Go".
- Bottom Panel - Quick Settings. Pay attention to the bottom part of the screen. There are very convenient selectors located there. With one click, you can change the IDE's color palette (Theme, for example to Islands Dark) and choose a convenient hotkey layout (Keymap).
Settings Customize
All detailed customization of appearance and fonts is located in a single global configuration window.
Click on the ☰ icon (in the top left corner of the window) and select File (Windows) or Golang (macOS).
In the menu of the opened window, navigate to: Settings/Preferences → Appearance & Behavior → Appearance.
Here you can configure the development environment in detail to suit your needs:
- Theme: choice of the interface color theme. You can check the Sync with OS box so that the theme changes along with your system settings.
- Zoom: scaling of all IDE elements. Note the tooltip nearby — you can quickly change the scale right while working with the shortcut
Alt+Shift+=(zoom in) andAlt+Shift+-(zoom out). - Use custom font: in the Accessibility block, you can enable this option to change the system interface font and its size.
5. Documentation — Your Main Assistant
JetBrains is famous for writing excellent guides for its tools. We strongly recommend checking out the official GoLand documentation.
It contains a huge amount of clear screenshots, GIFs, and short tutorial videos. It is very useful to click through these materials in your spare time instead of scrolling TikTok.
Now the development environment is installed and activated. In the next lecture, we will create our first project, download the Go compiler directly through the GoLand interface, write an entry point, and learn how to run console programs.
GO TO FULL VERSION