
Go
多多的伴随矩阵
这个作者很懒,什么都没留下…
展开
-
learning vim
Normal mode : exexute commandsx:delete the currenth;👈j:👇k:👆l:👉w: to the begin of the next wordb: to the begin of the last wordword hopping; ctrl + arrow keysdd or shift + v +d :delete the current lineyy: copy a lineu: undo the last actionp: pas原创 2022-11-08 12:15:23 · 275 阅读 · 0 评论 -
Golang并发模式
并发模式原创 2022-09-02 11:44:42 · 182 阅读 · 0 评论 -
go传统的同步机制
Lock()unLock()通过匿名函数,创建一个让锁生效的代码区lock和d efer unlock在该函数体内生效原创 2022-09-01 22:59:06 · 171 阅读 · 0 评论 -
GO语言的依赖管理
依赖的三个阶段:GOPATH, GOVENDOR, GO MOD所有的依赖都去GOPATH环境变量里去找,使得GOPATH越来越大,会将所有的第三方包放在src之下GOPATH/src/GitHub.testGOPATH/src/project1在自己的项目目录下新建一个叫做vendor的文件夹,存放依赖包,解决了不同的包依赖不同版本的问题GOPATH/src/project1/vendor。对目录的要求很高项目目录下go build ./… :将该目录下的所有文件都buildgo mod init原创 2022-06-03 10:50:35 · 2534 阅读 · 0 评论 -
Goland设置自动引入所用到的库 import
刚学习go没多久,记录下碰到的问题…File->Settings->Tools->FileWatchers->goimports然后等待他下载一会儿编程时候就自动引入所需要的库了,编程体验翻倍原创 2022-04-05 13:53:42 · 5170 阅读 · 0 评论 -
Go-Slices
Definition// dynamically-sized.// flexible view into the elements of an array.// A slice does not store any data, it just describes a section of an underlying array.// Changing the elements of a slice modifies the corresponding elements of its underlyi原创 2022-01-14 21:21:02 · 104 阅读 · 0 评论