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.
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.
After the installation is complete, test port 873. If it passes through, it will be fine.
The second step is to configure Goland
File -> Settings-> Build,Execution,Deployment -> Run Targets
There is docker here, obviously you can install the docker environment
Then just take the next step all the way.
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
Modify the startup items here
Then click run
And you can directly interrupt the point
final conversion environment
In go, some packages of windows and liunx are different, for example,
so you need to adjust the operating environment.
Choose linux here
That's it