GoLand remote development configuration environment

foreword

Recently, I am studying the book <Handwriting Docker>. The go environment used in the book is the liunx system, but I am developing on windows, so I want to find a remote development and compilation function.

However, all the remote configurations found on the Internet are in the following way, which does not conform to my method at all. The only thing that made me despair was such a bad method. Later, I accidentally discovered that there is a better method, and now 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.
insert image description here
Just configure the environment variables under the bin directory.

install rsync on liunx

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

The second step is to configure Goland

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

insert image description here
insert image description here
There is docker here, obviously you can install the docker environment

insert image description here
Then just take the next step all the way.
insert image description here
Let me say something 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 you can directly interrupt the point

insert image description here

final conversion environment

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

Choose linux here

That's it

Guess you like

Origin blog.csdn.net/qq_39164154/article/details/123284159