Compile and Run Go Code Using WSL 2 and GoLand 2021.1

preview_player
Показать описание
This tutorial will teach you how to use the Windows Subsystem for Linux version 2 (WSL 2) to run or test Go applications with GoLand IDE.

Contents:

00:05 - Introduction
00:47 - Example code overview

01:26 - Running using Windows
02:00 - Run an HTTP request from the IDE to the example web service
02:47 - Create a new WSL 2 run target
04:13 - Use a WSL 2 run target in a Go run configuration
05:26 - Run a configuration using a WSL 2 run target
06:39 - Debugging Go code in WSL 2
08:54 - Testing Go code (with coverage) using WSL 2
10:18 - Conclusion

Categories: #GoLand #WSL2 #go #golang
Рекомендации по теме
Комментарии
Автор

this is a really awesome feature. thanks for the great tutorial!

muonx
Автор

Thank you so much, it helped me a lot!

carolzillaa
Автор

I have my code in WSL 2. I can run it but cannot debug it. It's like the debugger starts but not the process to be debugged. When I "Stop" the debugger, then the application starts.

lh
Автор

how i use wsl to execute go get when i import a new package?

melquiadesmaciel
Автор

Hello! I can create the Run Target but on the build configurations I can't find the option to select the Run Target I created. could you lend a hand? Thanks!

RafaelCruz
Автор

When will it be possible to add goroot to wsl?

Christopher-qest
Автор

how the fuck do yo manage to use #{variable} inside a printf strin?

sebolio