下载golint下载golang的lint,下载地址:https://github.com/golang/lintmkdir-p$GOPATH/src/golang.org/x/cd$GOPATH/src/golang.org/x/gitclonehttps://github.com/golang/lint.gitgitclonehttps://github.com/golang/tools.git到目录$GOPA
下载golint下载golang的lint,下载地址:https://github.com/golang/lintmkdir-p$GOPATH/src/golang.org/x/cd$GOPATH/src/golang.org/x/gitclonehttps://github.com/golang/lint.gitgitclonehttps://github.com/golang/tools.git到目录$GOPA
一、在搭建的时候参考以下文章http://www.cnblogs.com/zsy/archive/2016/02/28/5223957.htmlhttp://blog.csdn.net/hil2000/article/details/51714607http://www.cnblogs.com/mubing/p/5820038.htmlhttp://www.golangtc.com/t/57d3961db09ecc1635000170二
一、通过runtime包进行多核设置1.NumCPU()获取当前系统的cpu核数2.GOMAXPROCS设置当前程序运行时占用的cpu核数版本1.6之前默认是使用1个核,而之后是全部使用。好玩的程序:funcdoSomething(){va
安装Go1.15版本大纲Windows安装GoLinux安装GoMacOS安装GoDocker安装Go总结视频地址:https://www.bilibili.com/video/BV14a4y177XG?p=3Windows安装Go1.点击下载go1.15版本的msi安装包64位系统https://studygolang.com/dl/gol
retry.Attempts(3)表示总共执行3次(含首次),即最多重试2次;需写retry.Attempts(4)才能重试3回;必须配retry.Context(ctx)响应取消、retry.DelayType(retry.BackOffDelay)启用指数退避、retry.RetryIf过滤错误,且HTTP重试须克隆Body并区分临时性错误。
select是Go语言中处理多通道操作的关键机制,类似switch但仅用于通道的发送或接收,当多个通道就绪时随机选择一个执行,确保并发安全与高效通信。