GoLand
 
Get GoLand
You are viewing the documentation for an earlier version of GoLand.

Run targets

Last modified: 23 August 2023

You can run your code in another environment such as cloud or a Docker container directly from GoLand.

For certain run/debug configurations, you can run your code in another environment such as cloud or a Docker container directly from GoLand.

This feature allows you to instantly test the changes against the real environment the app is intended for. This ensures that there will be no incompatibilities when moving to production, which is especially important when working on code that heavily depends on the environment.

Running the app directly in such environment also spares you the extra actions normally required to deploy and run the app every time something changes.

The environment that is used for running the app is referred to as target. For GoLand to run code on a target, the target has to define a language runtime, which represents something on the target that can be used by a run/debug configuration to run code.

In order to run your code on a target, all you need is to define the target execution environment in the run/debug configuration that you would normally use for local run. After you have done that, launching the app on a target is no different than launching it locally.

You can run several configurations on the same target. It is possible to set a project-wide default run target.