打開Goland,選擇File=》Plugins=》Install JetBrains plugins

搜索Remote Hosts Access,點擊Install

安裝好之后,重啟GoLand

配置
Settings=》build, execution, deployment=》deployment

Add Server:
命名和選擇SFTP

Connection里面的設置:
SFTP host:填寫服務器ip
Root path:服務器的go項目存放路徑,例如我配置的是/home/Go/go-project
User name:服務器賬號
Password:服務器密碼

Mappings里面的設置:
Local path:本地電腦的項目路徑
Deployment path on server:具體某個項目的路徑
配置完成!
把服務器項目下載到本地的項目文件中(2種情況:項目未下載過本地或已下載過本地):
1、之前未把項目下載到本地:
(1)、Tools=》Deployment=》Browse Remote Host

(2)彈出Remote Host之后,右鍵選擇項目=》Download from here

2、項目已下載的本地
Tools=》Deployment=》Download from xxx

本地代碼修改完成之后,上傳到服務器更新:
Tools=》Deployment=》Upload to xxx
