Go语言中文网 为您找到相关结果 3683

Slutty girls are like Wal-Marts

<p>Everyone makes fun of them but when you&#39;re inside one at 4am, you think &#34;Thank God these are here&#34;</p> <hr/>**评论:**<br/><br/>letshaveariot: <pre><p>Nobody ever wants one in the neighborhood, but once they&#39;re there, you realize you get everything you&#39;d get from the ...阅读全文

资源 2017-06-04 01:00:03 xuanbao

【区块链】Tendermint——本机单节点部署

Tendermint 由于工作原因2年前开始接触Hyperledger Fabric,其社区还是很活跃的,已经从当年的v0.7发展到如今v2.0了。但不得不说Fabric的体量还是挺大的,对于二次开发来说有一定难度。所以最近开始转向Tendermint,因为Tendermint更简单、易于理解、性能更高(当然这是Tendermint自己标榜的),不过事实上相对于Fabric确实更易于理解,更方便开发区块链的应用系统。 摘要 Tendermint由两个主要部分组成,一个负责共识,一个负责应用程序接口,共识引擎称作Tendermint Core,应用程序接口称作ABCI(Application BlockChain Interface),利用ABCI可以开发自己业务逻辑。而Tendermint ...阅读全文

博文 2020-01-29 18:32:38 夏洛克

golang快速入门[2.3]-go语言开发环境配置-linux

golang快速入门[2.3]-go语言开发环境配置-linuxlinux安装Go语言开发包默认读者会使用linux的基本操作配置go语言的开发环境的第一步是要在go官网下载页面下载开发包linux需要下载tar.gz压缩文件这里我们下载的是 64 位的开发包,如果读者的电脑是 32 位系统或者有特殊的需求,则需要下载 32 位的开发包在上图所示页面中向下滚动即可找到 32 位开发包的下载地址,如下图所示注意,如果在ubuntu这样有图形化界面的linux操作系统,我们可以直接下载没有图形化界面时,我们需要在命令行中操作第一步:下载开发包>> wget https://dl.google.com/go/go1.13.7.linux-amd64.tar.gz --2020-02-06 14:1...阅读全文

博文 2020-02-07 19:33:11 jonson_jackson

Is it possible to open a window, draw to it and register events from it with native Go code?

<p>Hi, I&#39;ve been wondering about this for some time, but looking through the standard library package list as well as some of the packages, I&#39;ve failed to find a way to do it.</p> <p>I&#39;m beginning to doubt whether it&#39;s possible, which would explain why all the gui libraries I&#39;ve seen rely o...阅读全文

First project

<p>Ok, I know, Its personal and whatever. But im out of ideas. I really wanna try Golang. I like gothreads, building to one binary and its not so far from python. </p> <p>But thing is, I kinda like python and its fits completely in my perosonal (home) use. Ordinary I build web-scrapper to try language speed, syntax and tooling bu...阅读全文

资源 2017-03-07 03:00:08 blov

Golang persistence: I want the security of prepared statements, but I also want low GC pressure and not having to write boilerplate for nested structures and joins.

<p>Golang persistence: I want the security of prepared statements, but I also want low GC pressure and not having to write boilerplate for nested structures and joins. Is there a well-tested, proven library out there for me? It seems like I have to choose between speed and security.</p> <hr/>**评论:**<br/><br/>kardianos:...阅读全文

资源 2017-03-29 07:00:13 blov

Has work on Glide ceased?

<p>I&#39;ve just been taking a look at the issues on GitHub to see if other people are experiencing an issue that I am when using Glide, and then realised that the last commit was on the 14th of December last year. I know just over a month doesn&#39;t seem like a long time, but I&#39;d imagine that Glide would be the kind of proje...阅读全文

资源 2018-01-26 04:30:02 xuanbao

How to manage hosts?

<p>My company uses Plesk as a solution to manage hosts. They write websites using php. I wonder, how can I find this kind of solution to manage hosts, but I want to write apps with Go. Is it possible to use Plesk and still write with Go? If the question sounds stupid you don&#39;t have to answer.</p> <hr/>**评论:**<br/><...阅读全文

资源 2017-11-01 18:00:04 agolangf

Newbie question: How does a golang server compare to NGINX and Apache?

<p>I used Apache in the past, for hosting PHP websites. I know very little about NGINX but from what I understand it&#39;s also a web/mail server. </p> <p>How do most developers use Go on the server, do they install the web server software together with the Go program, or do they use the stdlib http/smtp server? </p> &...阅读全文

Floating point determinism

<p>Hi all,</p> <p>I am currently interested in floating point determinism in golang - especially cross platform. As golang adheres to the IEEE-Standard, this should be a given, with the exception of possibilities like compiler optimisations and/or different libraries (e.g. for square roots) which are imported from C.</p> &...阅读全文

资源 2017-07-17 00:00:36 xuanbao

Golang和Erlang的并发调度浅析

Go 语言和 Erlang 都是面向并发应用的语言,都采用轻量级线程和消息传递模型。尽管Go在语法上也支持共享,但必须以通信的方式同步方能保证其正确性。Erlang则是完全不支持进程间的共享,状态信息完全需要依靠消息彼此传递。从底层来看,在 Google 官方编译器中,Go 语言的 Goroutine 是一种类似协程的结构,由于采用了定制的C编译器来构建,因此其上下文切换的效率要高于C库的 coroutine(只需要切换PC和栈帧,其他寄存器由函数调用者负责保存); 而在 Go 的 GCC 前端中,Goroutine 则直接由C库的 coroutine 机制实现。由于 Erlang 是基于 BEAM 虚拟机执行的,因此它的所谓 “轻量进程” 也就仅仅是 BEAM 上的概念,不对应C语言或OS...阅读全文

博文 2019-03-17 13:09:33 erlib

Nominate your library to be reviewed + improved at GoSF on March 23

<p>I&#39;m giving a talk at GoSF on March 23 walking through how experienced Gophers reviewed and improved a couple of real open-source libraries, nominated by their creators here in this thread. The reviews will occur in the open and will come in the form of multiple mergeable pull requests to your library in the next 30 days.</p> ...阅读全文

资源 2017-02-25 14:00:22 agolangf

offline go dev on windows

<p>Hello! Could anyone share best practice for subj. I have 2 PC. One for internet and one for dev. </p> <p>Internet PC has no admin rights so no installation. Only portable. </p> <p>Dev PC has no Internet connection. But has admin rights. So install Go env, gogland and so - is not problem.</p> <p>Probl...阅读全文

资源 2017-07-20 13:30:21 polaris

Which external packages would you like to become part of the standard library?

<p>Which external packages you believe are so well-written, clean, battle-tested or otherwise awesome enough that you would like them to become part of the standard library in the future?</p> <hr/>**评论:**<br/><br/>dchapes: <pre><p>The Go authors are doing the reverse, keeping new stuff out of the standard l...阅读全文

24.依赖管理及go module

Go语言的依赖管理随着版本的更迭正逐渐完善起来。 windows开启go module:set GO111MODULE=on Linux开启go module:export GO111MODULE=on 依赖管理 为什么需要依赖管理 最早的时候,Go所依赖的所有的第三方库都放在GOPATH这个目录下面。这就导致了同一个库只能保存一个版本的代码。如果不同的项目依赖同一个第三方的库的不同版本,应该怎么解决? godep Go语言从v1.5开始开始引入vendor模式,如果项目目录下有vendor目录,那么go工具链会优先使用vendor内的包进行编译、测试等。 godep是一个通过vender模式实现的Go语言的第三方依赖管理工具,类似的还有由社区维护准官方包管理工具dep。 安装 执行以下命令...阅读全文

博文 2020-05-05 13:32:44 雪上霜

Is there a good way to tell the optimal number of HTTP requests to make simultaneously?

<p>I&#39;ve written a couple of web crawler-type programs in Go, and whenever I do, I run into the question of how many worker goroutines I should spawn. It has to be limited to keep from exhausting file descriptors, but what is a good limit? I usually just spawn 10 or 20 because those seem to give decent performance, but is there a good ...阅读全文