Go

Go

Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.

Go is an open source project developed by a team at Google and many contributors from the open source community.

playlist

Highlights of GoLand 2023.3
Explore key features and enhancements in GoLand 2023.3.

tip

Code coverage for applications
Track code execution and identify dead code effectively

tip

Improve Code Readability and Navigation
Discover how to manage code visibility with code folding in Go

tip

Create a function in another package
Type a non-existing function name and generate its implementation in a package of your choice

tip

Introduce parameters from unresolved references in your code
Change a function or method signature by introducing parameters directly from unresolved references

tip

Empower your `Printf`-like functions with coding assistance
Provide hints and highlights for message formats in custom `Printf`-like functions

tutorial

Authentication for Go Applications: The Secure Way
This article compares the pros and cons of five different authentication methods: Basic HTTP, bearer token, JWT, OIDC, and SAML.

Part of tutorial

Authentication for Go Applications: The Secure Way
This article compares the pros and cons of five different authentication methods: Basic HTTP, bearer token, JWT, OIDC, and SAML.

Part of tutorial

Go REST Guide. Gin Framework
The third part of this series looks at how to build a REST API using a web framework called Gin.

Part of tutorial

Go REST Guide. gorilla/mux Router
The second part of this series demonstrates how to use a router for improved handling of requests when building REST APIs.

tutorial

Go REST Guide
This is a three-part series dedicated to three different methods of building a Go REST API.

Part of tutorial

Go REST Guide. The Standard Library
The first part of this series focuses on using the standard library, a simple and native way to create HTTP servers.

playlist

New Features in GoLand 2023.1
A selection of useful features from GoLand 2022.3.

tip

Vulnerability checker
Analyze your codebase and highlight known vulnerabilities in go.mod

tip

Convert between different types of strings
Convert strings that are surrounded by backticks to double-quoted ones and vice-versa

tip

Intention action to convert integers to strings
Convert an integer to a string by using the `strconv.Itoa()` call

tip

Create inspections with regular expressions
Use regular expressions to create your own search and replace inspections

tip

Implement an interface
Implement unexported interfaces by pressing Ctrl + I

tip

Rename generic receivers along with a generic struct
Rename generic receivers along with a generic struct

playlist

New Features in GoLand 2022.3
A selection of useful features from GoLand 2022.3.

tip

Code vision
Focus on your code while getting additional information about it.

tip

Generate tests for generic functions
Use a shortcut to generate test files for your generic functions.

tip

Generate 'go.work' for a project
Generate 'go.work' by using the context menu or a quick-fix with 'replace' directives

tip

Integrated Go Playground
You can format and share your code, change the Go version, and run your code using the Go playground server.

playlist

New Features in GoLand 2022.2
A selection of useful features from GoLand 2022.2.

tip

Changing the font size in the editor
Use a keyboard shortcut to change the font size in the editor.

tip

Rename constants that use reserved names
Rename a constant if it uses a name of a built-in constant.

tip

Run Anything
Launch run/debug configurations, applications, scripts, commands, tasks, and open recent projects.

tip

Group multiple `use` directives in `go.work`
Merge multiple `use` directives in `go.work` into one directive.

tip

Convert empty interfaces to `any`
Check and replace empty interfaces that are used as types or type constraints.

tip

Delete a type parameter with an empty parameter list
Type parameters with empty parameter lists are reported as errors, but you have a quick-fix to put it right.

tip

Fuzz testing
Automate your tests by continuously submitting various input.

tip

Fill Paragraph for Go Comments
Ensure that comments have the width you like.

playlist

New Features in GoLand 2021.2
A selection of useful features from GoLand 2021.2

tip

Declare a targeted Go version in go.mod
The IDE is aware of targeted Go versions

tip

Improved display of attached projects
Work with multiple projects at once from the same IDE window

tip

Go 1.17: Convert slice to array pointer
With Go 1.17, it is possible to covert a slice to an array pointer

tip

Load go.mod changes manually
Take control of when go.mod files are refreshed

tip

Create a Scratch file from selection
Create scratches faster and get the contents you want to test pre-populated

tip

Remove empty scratches automatically
Let the IDE handle the cleanup after testing your ideas

tip

Run gofmt after the builtin formatter
Ensure that your code is always formatted with gofmt.

tip

Select the builtin Terminal cursor shape
Make the terminal your own, with the cursor shape you want

tip

Detect unused dependencies in go.mod files
Cleanup go.mod files and keep them lean

playlist

New Features in GoLand 2021.1
A selection of useful features from GoLand 2021.1

tip

Add keys to struct field tags
Quickly add JSON, XML, or custom keys to all struct fields

tip

Add new fields to struct types from JSON
Add new fields in your API objects with a copy-paste

tip

Change struct tag style
Quickly change from different styles the struct tags

tip

Create getters and setters for struct fields
Generate the support code to access fields indirectly, via getters and setters

tip

Create missing struct types with all fields
Prototype your code then worry about creating the types

tip

Extract Type Refactoring
Extract a type into its own definition and improve the reusability in your code

tip

Support for go:embed directive
Embed files and folders into your binaries with no external tool

tip

Handle Go errors by using a Postfix Completion
Keep writing code as you would and use the Postfix Completion to generate the boilerplate

tip

Convert JSON to Go types via copy-paste
Converting a JSON response to a Go type has never been faster than this

tip

Quickly handle errors in Go
Handling errors is essential in any application

tip

Rename Go module refactoring
Upgrade Go modules to newer versions with ease

tip

Run Target support via WSL
Run your application or tests in Windows Subsystem for Linux (WSL) with ease

tip

Detect incorrect usages of t/b.Fatal* calls in goroutines
Find if tests or benchmarks are using t/b.Fatal* calls inside goroutines incorrectly

playlist

New Features in GoLand 2020.3
A selection of useful features from GoLand 2020.3

tip

Assert completion in testify
Write testify asserts faster thanks to the IDE smartness

tip

Better time format in completion
Use the commonly known date/time formatting strings while writing time formatting in Go

tip

Dump goroutines from a running application
Inspect the goroutines and memory of your application as it runs

tip

Go 1.16: retract directive
Retract specific versions of your modules

tip

Inline watches in debugger
Keep your eyes on the code at all times

tip

Detect incorrect usage of Println/Printf like functions
Formatting functions from packages such as pkg/errors, logrus or zap

tip

Check context.CancelFunc usage
Ensure that the cancel function is always called

tip

Live Template to create a for loop in benchmark functions
Benchmark loops are repetitive, so let the IDE handle this for you

tip

Live Template to create test function
Write tests faster thanks to the builtin func Test live template.

tip

Live Template to write benchmark function
Write benchmarks quicker thanks to the builtin bench live template.

tip

Navigate to subtests in table tests
Jump to the specific test case from the results window

tip

Rerun testify subtests
Rerun just the subtest you need from a testify suite.

tip

Run individual testify test suites
Run only the testify test suites or subtests that matter to you

tip

Run a single test from a table test
Focus your testing on new test cases or tests that fail

tip

Stop a Remote process after debugging it
Clean-up processes after interacting with them in remote debugging scenarios

tip

Completion for testify test names
Let your IDE add constructor arguments to your instance.

tip

Detect variable shadowing while writing Go code
Easily spot where you shadow variables that you did not intend to

playlist

General Tips & Tricks
Become an IDE power-user with these bite-sized tips and tricks.

tip

Add Line After/Before
Smart-add a line, from the middle of a line, after or before the current line.

tip

Adding Fields To a Struct
Let your IDE add constructor arguments to your instance.

tip

Navigate Cursor Position Back and Forth
Navigate back to where you were, or where you went.

tip

Disable Tabs
Save space and stay keyboard-centric by turning off the tabs.

tip

Evaluate Expression During Debugging
Select your code and execute it, in the right context.

tip

Generate Imports While Typing
Avoid interruption by letting GoLand generate your imports as you type.

tip

Install and import
While typing a symbol, let GoLand install it and generate the import.

tip

Activate Navigation Bar
Bring up the Navigation Bar as needed, let it disappear when finished.

tip

Find In Path With Navigation Bar
Use keyboard and Navigation Bar to find files under a path.

tip

Create New File With Navigation Bar
Activate the Navigation Bar and create a new file somewhere in the project tree.

tip

Navigate to Symbol
Navigate your project by code, not files.

tip

Optimize Imports
Automate the organizing and cleaning up of your Go imports with Optimize Imports.

tip

Reduce Clutter by Disabling Tools
Save space by turning off various toolbars and Project Tool.

tip

Rename a File and Its References
Change your mind on a file name, and the IDE makes all the changes for you.

tip

Reformat Code
Tell GoLand to clean up indentation and other code style in your file.

tip

Run Single Test
Speed up testing by focusing on one test.

tip

Split Screen Without Tabs
Get your code and tests side-by-side without using tabs.

tip

Complete Current Statement
Add trailing commas or braces and move the cursor with a single keystroke

playlist

Editing Tips & Tricks
Learn some of the most useful Editing features of GoLand.

tip

Call Hierarchy
Analyze call trees for functions or methods

tip

Compare with clipboard
Compare text, files or directories and even use the clipboard contents

tip

Custom Structure tags
Add custom tags to any fields from structures

tip

Expanding/shrinking selection
Select portions of code that you need to, faster

tip

Generate a test for an element
Automate test generation

tip

Hide all tool windows
Hide all the tool windows in the IDE

tip

Go to/from a test
Navigate to and from a test subject like a method or function

tip

Implement an interface
Implementing an interface is a common task that Go programmers need to do

tip

Jump to the Navigation Bar
Get an overview of your current location, and the project itself

tip

Multiple selections
Select multiple items faster

tip

Navigate between opened files using the Switcher
Don't use the mouse to quickly move between multiple files

tip

Navigate to File
Jump to a file without using the Project Tool Window, and your mouse

tip

Paste from history
Paste from the clipboard even if it's not the last item you copied into it

tip

Recent Locations
Jump back and forth between files using code snippets you've recently seen

tip

Select all occurrences in a file
Quickly select all occurrences of a piece of text in the current file

tip

Select in
Select the current file in the Project or Changes view and more

tip

Show usages
Quickly discover the usages of the element your cursor is at

tip

Speed typing
Quickly navigate to or filter any list of items in the IDE

tip

Structure tags
Quickly add tags to any fields from structures

tip

Switch to the editor
Get the focus back to the editor regardless what is currently focused

tip

Structure popup
View the file or whole package structure and navigate to any element

tip

Type Hierarchy
Discover what types implement an interface or what interfaces are implemented by a type

playlist

Completion Tips & Tricks
Know everything there is to know about Code Completion.

tip

Basic Code Completion
Code completion that helps you get the job done

tip

Code Completion in Language Injections
See how to use code completion inside strings and other places

tip

Code completion in Evaluate Expression, Watches or Conditional Breakpoints
The debugger also has code completion capabilities.

tip

Code completion in Run Configurations
Run configurations also have code completion capabilities.

tip

Completion for non-imported Go Modules
Import a module even if it was imported or used in your project

tip

Completion with the Tab key
A small, but handy feature that makes it a little easier to complete symbol names.

tip

Cyclic Expand Word a.k.a. Hippie Completion
Complete any word any from the current open files.

tip

Exclude items from auto-imports and completion
Exclude certain paths from auto-import and completion

tip

Method-like completion for functions
Completion for searching for functions that accept parameters of a certain type.

tip

Live Templates
Add your own completion items via code snippets

tip

View Parameter Info
Quickly see function arguments and argument types.

tip

Smart Code Completion
The king of code completion in GoLand.

tip

Postfix Completion
Transform an expression into another one.

tip

Partial Match Completion
Complete anything by typing just parts of the identifier