随笔分类 -  golang

摘要:下面这两种方法都需要手动删除package的源码目录。 1、手动删除 It's safe to just delete the source directory and compiled package file. Find the source directory under $GOPATH/sr 阅读全文
posted @ 2018-04-15 16:12 微信公众号--共鸣圈 阅读(40189) 评论(0) 推荐(1)
摘要:GOPATH可以设置多个工程目录,linux下用冒号分隔(必须用冒号,fish shell的空格分割会出错),windows下用分号分隔,但是go get 只会下载pkg到第一个目录,但是编译的时候会搜索所有的目录。 在fish shell下,使用 set -x GOPATH "PATH1:PATH 阅读全文
posted @ 2018-04-15 12:04 微信公众号--共鸣圈 阅读(608) 评论(0) 推荐(0)
摘要:go tool vet是你的好朋友,不要忽视它。 vet是一个优雅的工具,每个Go开发者都要知道并会使用它。它会做代码静态检查发现可能的bug或者可疑的构造。vet是Go tool套件的一部分,我们会在以后的文章中详细描述tool套件。它和go编译器一起发布,这意味着它不需要额外的依赖,可以很方便地 阅读全文
posted @ 2018-04-14 15:02 微信公众号--共鸣圈 阅读(5444) 评论(0) 推荐(0)
摘要:介绍 不论是开发Java还是你正在学习的Golang,都会遇到依赖管理问题。Java有牛逼轰轰的Maven和Gradle。 Golang亦有godep、govendor、glide、gvt、gopack等等,本文主要给大家介绍gilde。 glide是Golang的包管理工具,是为了解决Golang 阅读全文
posted @ 2018-04-14 08:21 微信公众号--共鸣圈 阅读(450) 评论(0) 推荐(0)
摘要:Vendor目录介绍 随着Go 1.5 release版本的发布,vendor目录被添加到除了GOPATH和GOROOT之外的依赖目录查找的解决方案。在Go 1.6之前,你需要手动的设置环境变量GO15VENDOREXPERIMENT=1才可以使Go找到Vendor目录,然而在Go 1.6之后,这个 阅读全文
posted @ 2018-04-14 00:11 微信公众号--共鸣圈 阅读(4983) 评论(0) 推荐(0)
摘要:https://blog.golang.org/context Introduction In Go servers, each incoming request is handled in its own goroutine. Request handlers often start additi 阅读全文
posted @ 2018-04-12 18:39 微信公众号--共鸣圈 阅读(794) 评论(0) 推荐(0)
摘要:https://github.com/avelino/awesome-go https://github.com/spf13/cobra # A Commander for modern Go CLI interactions https://github.com/lxn/walk # A Wind 阅读全文
posted @ 2018-04-11 16:38 微信公众号--共鸣圈 阅读(788) 评论(0) 推荐(0)
摘要:https://github.com/minio/c2goasm http://microapl.com/asm2c/index.html 收费的 https://github.com/xlab/c-for-go c转golang https://github.com/xlab/android-go 阅读全文
posted @ 2018-04-11 16:09 微信公众号--共鸣圈 阅读(798) 评论(0) 推荐(0)
摘要:Simple error handling primitives: https://github.com/pkg/errors Defer, Panic, and Recover: https://blog.golang.org/defer-panic-and-recover golang的defe 阅读全文
posted @ 2018-04-11 11:58 微信公众号--共鸣圈 阅读(5262) 评论(3) 推荐(0)
摘要:https://blog.golang.org/pipelines https://www.cnblogs.com/junneyang/p/6215785.html 简介 Go语言的并发原语允许开发者以类似于 Unix Pipe 的方式构建数据流水线 (data pipelines),数据流水线能够 阅读全文
posted @ 2018-04-11 11:52 微信公众号--共鸣圈 阅读(2325) 评论(0) 推荐(0)
摘要:An Old Hope Theme (theme, 推荐,且推荐它的 classic theme,安装后在颜色选项里选择,该插件的定制见文末) Cobalt2 (theme) Dracula for Visual Studio Code (theme) markdownlint Go for Vis 阅读全文
posted @ 2018-04-09 17:49 微信公众号--共鸣圈 阅读(2192) 评论(0) 推荐(0)
摘要:visual studio code (vsc) 对开发c,c++,node.js,javascript,python,html,golang,及撰写markdown等比较友好,同时支持git浏览及分屏对比,运行速度快,所以是值得一用的编辑器。 vscode阅读c和c++代码的插件clangd cl 阅读全文
posted @ 2018-04-09 07:32 微信公众号--共鸣圈 阅读(2211) 评论(0) 推荐(0)
摘要:http://www.jerf.org/iri/post/2917 Sum Types in Go posted Jun 02, 2013 in Programming, Golang, Haskell A couple of months back, I analyzed whether I wa 阅读全文
posted @ 2018-04-08 14:39 微信公众号--共鸣圈 阅读(2858) 评论(0) 推荐(0)
摘要:https://software.intel.com/en-us/blogs/2014/05/10/debugging-performance-issues-in-go-programs https://studygolang.com/articles/2729 Go 程序的性能调试问题 假设你手上 阅读全文
posted @ 2018-04-01 21:30 微信公众号--共鸣圈 阅读(331) 评论(0) 推荐(0)
摘要:https://ttboj.wordpress.com/2016/02/15/debugging-golang-programs/ I’ve been writing a lot of golang lately. I’ve hit painful problems in the past. Her 阅读全文
posted @ 2018-03-29 12:40 微信公众号--共鸣圈 阅读(805) 评论(0) 推荐(0)
摘要:http://tleyden.github.io/blog/2014/10/30/goroutines-vs-threads/ Here are some of the advantages of Goroutines over threads: You can run more goroutine 阅读全文
posted @ 2018-03-29 12:29 微信公众号--共鸣圈 阅读(590) 评论(0) 推荐(0)
摘要:https://blog.conformal.com/category/btcd/ https://github.com/btcsuite/btcd/tree/master/docs https://github.com/btcsuite/btcd https://github.com/ethere 阅读全文
posted @ 2018-03-24 10:18 微信公众号--共鸣圈 阅读(377) 评论(0) 推荐(0)