GoLand remote development configuration environment

foreword

Recently I am learning the book <Do it yourself docker>. The go environment used in the book is the liunx system, but I am developing on windows, so I want to find a function for remote development and compilation

But the remote configuration I found on the Internet is all in the following way, which is completely inconsistent with my method. I was desperate for only such a bad method. Later, I accidentally discovered that there is a better method, and now I record it

Tools > Deployment > + SFTP > Configuration > Connection   #这个用的是真的无语 完全不好用

 

 

The first step is to install rsync

windows installation

https://itefix.net/dl/free-software/cwrsync_6.2.4_x64_free.zip

Download the file, unzip it, and configure the environment variables. The
insert image description here
environment variables can be configured under the bin directory.

linux install rsync

https://www.cnblogs.com/haw2106/p/9868753.html
Just follow this tutorial and install the yum installation method. After the
insert image description here
installation is complete, test port 873.
insert image description here

The second step configures Goland

File -> Settings-> Build,Execution,Deployment -> Run Targets

insert image description here
insert image description here
There is docker here. It is obvious that the docker environment can be installed

insert image description here
Then all the way to the next step, let
insert image description here
me say it here, if the following sentence is prompted here

rsync not found in local PATH

You can go to the cmd console to see if rsync can run, if it can run, but it keeps prompting
rsync not found in local PATH , then restart the computer

After the above ssh connection configuration is completed

insert image description here
Modify the startup items here
insert image description hereinsert image description here

then click run

insert image description here
And can directly interrupt the point

insert image description here

final conversion environment

In go, some packages of windows are different from liunx, for example,
insert image description here
so you need to adjust the running environment.
insert image description here

choose linux here

it's done

{{o.name}}
{{m.name}}

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324191243&siteId=291194637