Running applications in Go Playground
You can run your Go code in GoLand by using the Go playground server to process it. When you use the Open in | Playground action, GoLand creates a scratch file with your code and displays a toolbar that contains the same options that you see in the Go playground.
You can format and share your code, change the Go version, run your code by using the Go playground server, or run it locally.
GoLand displays a toolbar with the Go Playground controls for Go scratch files.
![the Go playground inside GoLand the Go playground inside GoLand](https://resources.jetbrains.com/help/img/idea/2024.3/go_the_go_playground_inside_go_land.png)
Select code that you want to run in the Go Playground.
Right-click the selection and navigate to Open In | Playground.
Click the Run icon (
) on the toolbar.
Note: if you run your code from the context menu or from the gutter, GoLand runs your code locally. Also, you can run your code locally by selecting the Run locally.
In the main menu, go to File | New | Scratch File or press CtrlAltShiftInsert.
From the New Scratch File window, select Go.
On the toolbar, click the Load icon (
).
In the dialog, select the source of your code: File or URL.
Click OK.
Open your code in a scratch file. For more information about scratch files, refer to Scratch files.
To create a new file, select File | New | Scratch File from the main menu or press CtrlAltShiftInsert.
On the toolbar, click the Format icon (
).
Open your code in a scratch file. For more information about scratch files, refer to Scratch files.
To create a new file, select File | New | Scratch File from the main menu or press CtrlAltShiftInsert.
On the toolbar, click the Format icon (
).
Depending on the selected version, GoLand adds a version parameter to the generated link to the Go Playground.
Open your code in a scratch file. For more information about scratch files, refer to Scratch files.
To create a new file, select File | New | Scratch File from the main menu or press CtrlAltShiftInsert.
From the Go version drop-down, select the version that you want.
Depending on the selected version, GoLand adds a version parameter to the generated link to the Go Playground.
Open your code in a scratch file. For more information about scratch files, refer to Scratch files.
To create a new file, select File | New | Scratch File from the main menu or press CtrlAltShiftInsert.
From the Go version drop-down, select the version that you want.
Thanks for your feedback!