TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Learning Golang – From Zero to Hero

287 点作者 milap将近 6 年前

9 条评论

olah_1将近 6 年前
This[0] is the best way I&#x27;ve seen to learn Golang. It&#x27;s exactly what <i>I</i> needed to make things stick and make sense.<p>0: <a href="https:&#x2F;&#x2F;quii.gitbook.io&#x2F;learn-go-with-tests&#x2F;" rel="nofollow">https:&#x2F;&#x2F;quii.gitbook.io&#x2F;learn-go-with-tests&#x2F;</a>
评论 #20377971 未加载
评论 #20376089 未加载
irq-1将近 6 年前
&gt; With a buffered channel, the receiver will not get the message until the buffer is full.<p>This is wrong. <a href="https:&#x2F;&#x2F;golang.org&#x2F;doc&#x2F;effective_go.html#channels" rel="nofollow">https:&#x2F;&#x2F;golang.org&#x2F;doc&#x2F;effective_go.html#channels</a><p>&gt; Receivers always block until there is data to receive. If the channel is unbuffered, the sender blocks until the receiver has received the value. If the channel has a buffer, the sender blocks only until the value has been copied to the buffer; if the buffer is full, this means waiting until some receiver has retrieved a value.
评论 #20398645 未加载
tschellenbach将近 6 年前
I wrote this post about learning Go: <a href="https:&#x2F;&#x2F;getstream.io&#x2F;blog&#x2F;go-1-11-rocket-tutorial&#x2F;" rel="nofollow">https:&#x2F;&#x2F;getstream.io&#x2F;blog&#x2F;go-1-11-rocket-tutorial&#x2F;</a><p>We switched from Python to Go over 2 years ago and it&#x27;s been an amazing improvement in terms of performance as well as developer productivity for building high traffic endpoints.
Strum355将近 6 年前
Info about workspace is outdated. Go modules allows you to to work outside GOPATH
评论 #20374974 未加载
评论 #20375842 未加载
评论 #20374827 未加载
评论 #20375571 未加载
qwerty456127将近 6 年前
Such a great language. If only it had a good GUI library...
评论 #20376559 未加载
评论 #20376172 未加载
评论 #20379763 未加载
评论 #20376881 未加载
dlhavema将近 6 年前
I love reading articles like this. I really want to find a good work related reason to learn Go, just not a thing right now.<p>My main concern with the article is the massive abundance of typos. Like more so than a normal article written by a programmer. They make me stop and double check if I read it wrong, it is a term or something I haven&#x27;t seen before, or just a typo.
mac_was将近 6 年前
I wosh I had time to learn new languages as I used to... but with 2 kids, one being 4 months it is nearly impossible. How do others devs hungry for knowledge deal with situations like this one?
评论 #20379489 未加载
评论 #20376745 未加载
评论 #20376821 未加载
nivertech将近 6 年前
skip Golang, go straight for Rust<p>EDIT:<p>as my time for learning new programming languages is limited, I would invest it in learning Rust, rather than learning Golang or learning both of them.<p>IMO the only reason to learn Golang is if your already have a legacy Golang codebase or if you want to contribute to various open source projects written in Go, like for example Kubernetes (my first experience with Golang was trying to compile a patched Hashicorp project).<p>It&#x27;s the same as suggesting to a front-end dev, skipping Backbone, Ember and Angular and going straight for React.<p>There are lots of overlapping technologies in our space and learning all of them is a huge time waste.
评论 #20375291 未加载
评论 #20376137 未加载
评论 #20375124 未加载
评论 #20375913 未加载
jnordwick将近 6 年前
Go&#x27;s not existent standard library is almost a deal breaker for me.<p>The lack of even a dynamic array (c++ vector, Java arraylist) means you write a lot of 2-3 lines of slice notation phrases that require stopping and thinking about indices you wouldn&#x27;t need to in other languages (and creating a lot of zero length slices for boundary conditions that shouldn&#x27;t be needed). Also no balanced tree is a big issue (googles side implemention sucks in that the comparator cannot be passed in).<p>I recently tried to write some small library functions using sqlx to do arbitrary sql queries and then some munging of the results before returning it. It was extremely difficult.<p>The language feels half done at times. I find it hard to believe that Google used it much internally before releasing it. So many unfinished corners.<p>Generics would go a long way to fixing some of these issues.<p>While the ahead of time compilation is nice and had lead to me using it for things that need fast startup (some shell like scripts and literally old school cgi), it often seems like a worse Java.<p>If you don&#x27;t like Java&#x27;s verbosity, go&#x27;s from my small use is about twice as bad. 300 lines of go does surprisingly little - part of this is gofmt&#x27;s fault though.<p>Also, does anybody know of good performance tests between Java and go? I mean like well written and optimised. Most tests over I&#x27;ve are very poorly written and do dumb things like include hotspot startup and compilation times. Hotspot can generate some very slick code, but it just takes 10k passes to get up that point.
评论 #20375533 未加载
评论 #20376213 未加载
评论 #20375523 未加载
评论 #20378866 未加载