当前位置:网站首页>GoLand debug go use - white record
GoLand debug go use - white record
2022-04-23 09:02:00 【mygugu】
Prerequisite environmental inspection :
goland Installation successful ;
go Environment variable configured , verification :
cmd---- Input go version Version information can be displayed , as follows :
![]()
see go environmental information , Through the command go env Realization , as follows : Focus on GOPATH

thus , The environment is complete !
Bug Repair :
- git clone After code ,goland Open error report
GoLand:Cannot resolve symbol
as well as sync dependencies ofxxx I also made mistakes when I was young , However, running the official sample code can work normally .
Later it was found that GOPATH Problems setting up the , Revised as follows :
setting---Go--GoPath, take Global Path and Project GOPATH Add your own settings at GOPATH route . Pictured above go env Shown . Click again sync dependencies of xxx Automatically install the required packages .
If in go build It's like
go: could not create module cache: mkdir C:\Program Files\Go\bin\pkg: Access is denied.
Also because the code is not placed in GOPATH Under specified directory , Put the code in GOPATH Under the table of contents , Again go build It was successful .
Add :
GOROOT and GOPATH difference :
GOROOT: namely go The installation path , Generally, it doesn't matter .
GOPATH Save the project code , It's a working directory at development time .
Besides GOPATH Multiple directories can be set :
Windows Next : Intermediate use “;” separate
GOPATH=C:/path1;C:/path2;
Linux Next : Intermediate use “:” Separate
GOPATH="/xxx/path1:/xxx/path2"
Be careful :
go get It is installed to the first... By default GOPATH route
go build when , Sometimes it will report that the same type or method does not match , Because many are GOPATH The wrong order of paths leads to , Change the order to solve
goland Connect to remote server :
Here's the picture :settings---Tools---SSH Configurations( Some tutorials say Deployment, But I didn't find )
There was no connection information at first , Click on “+” Can be added to , Write your own remote server user name ,IP, password , Port number , Sure Test connection Under test .

(2)Terminal End to end connection to remote server , direct ssh user name @ The server IP that will do , Input password , That's it .
版权声明
本文为[mygugu]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230722594368.html
边栏推荐
- Learn SQL injection in sqli liabs (Level 11 ~ level 20)
- Complete binary search tree (30 points)
- web页面如何渲染
- 搞不懂时间、时间戳、时区,快来看这篇
- 论文阅读《Multi-View Depth Estimation by Fusing Single-View Depth Probability with Multi-View Geometry》
- MySQL查询两张表属性值非重复的数据
- Matlab draw five-star red flag
- Initial experience of talent plan learning camp: communication + adhering to the only way to learn open source collaborative courses
- Solidity 问题汇总
- Basic usage of synchronized locks
猜你喜欢

Summary of solid problems

Experimental report on analysis of overflow vulnerability of assembly language and reverse engineering stack

valgrind和kcachegrind使用运行分析

The most concerned occupations after 00: civil servants ranked second. What was the first?

Four pictures to understand some basic usage of Matplotlib

Idea is configured to connect to the remote database mysql, or Navicat fails to connect to the remote database (solved)

Cadence process angle simulation, Monte Carlo simulation, PSRR

Share the office and improve the settled experience

valgrind和kcachegrind使用運行分析

MySQL查询两张表属性值非重复的数据
随机推荐
根据后序和中序遍历输出先序遍历 (25 分)
小女孩行走
MYCAT configuration
Pctp test experience sharing
求简单类型的矩阵和
Notes d'apprentissage oneflow: de functor à opexprinterpreter
玩转二叉树 (25 分)
About CIN, scanf and getline, getchar, CIN Mixed use of getline
web页面如何渲染
PLC的点表(寄存器地址和点表定义)破解探测方案--方便工业互联网数据采集
Valgrind and kcache grind use run analysis
BK3633 规格书
LeetCode_ DFS_ Medium_ 1254. Count the number of closed islands
爬虫使用xpath解析时返回为空,获取不到相应的元素的原因和解决办法
Wechat: get the owner of a single tag
Find the sum of simple types of matrices
MySQL小练习(仅适合初学者,非初学者勿进)
Harbor enterprise image management system
MySQL small exercise (only suitable for beginners, non beginners are not allowed to enter)
Four pictures to understand some basic usage of Matplotlib