---
title: "Potential Go 1.17 improvements"
publication: "Go Weekly"
issue: 359
published_at: "2021-04-23"
canonical_url: "https://golangweekly.com/issues/359"
---

Plus an interview with the author of the 'Learning Go' book. |        

#​359 — April 23, 2021 

[Unsubscribe](https://golangweekly.com/leave/*|UID|*)|[Read on the Web](https://golangweekly.com/issues/359)   

⭐️ This week we're lucky to have been able to interview Jon Bodner, the author of _Learning Go_ which has just been published by O'Reilly. Check it out at the end of the issue and find out what Go features you should be avoiding :-)
__
_Peter Cooper, your editor_  

Go Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/xabduoobyk0rk0vjerjm.jpg)](https://github.com/golang/go/issues/40724#issuecomment-821758073)  

[Go 1.17 (..Hopefully) to Provide Better Performance via Register-Based Calling Convention](https://github.com/golang/go/issues/40724#issuecomment-821758073) — The details (which are quite technical) are all in this GitHub issue, but the takeaway is in the headline. More performance is good and a 6.5% bump is suggested here. This is on AMD64 for now, but ARM64 is the next architecture they’re planning to work on. 

Go Team   

[Maybe Go Executable Files _Aren't_ Full of 'Non-Useful Bits'](https://news.ycombinator.com/item?id=26834128) — Last week we featured an update to 2019’s [Why are my Go executable files so large?](https://dr-knz.net/go-executable-size-visualization-with-d3.html) where the author argued that modern Go binaries continue to be full of ‘non-useful bits.’ This article has now [become a retraction](https://www.cockroachlabs.com/blog/go-file-size-update/) as Russ Cox hit Hacker News to clear up what was going on, noting that the piece was ‘full of misinformation.’ 

Russ Cox   [![\](https://copm.s3.amazonaws.com/f9edb161.png)](https://buildkite.com/blog/fail-fast?utm_campaign=CPress&utm_source=ppc&utm_medium=go-newsletter&utm_term=cicd-builds&utm_content=amazon-eventbridge) 

[The Sooner a Build Turns Red, the Sooner You Can Unblock Your Pipeline](https://buildkite.com/blog/fail-fast?utm_campaign=CPress&utm_source=ppc&utm_medium=go-newsletter&utm_term=cicd-builds&utm_content=amazon-eventbridge) — The ability to cancel builds as soon as possible provides developers with a quicker feedback loop, saving time and reducing the cost of running agents. 

Buildkite sponsor   

[Excelize 2.4.0: A Library for Reading and Writing Excel Files](https://github.com/360EntSecGroup-Skylar/excelize) — Read and write XLSX files, set and read cell values, add charts. This latest release [adds a _lot_](https://github.com/360EntSecGroup-Skylar/excelize/releases/tag/v2.4.0) with support for 152 formula functions, a new API to get rich text from cells, and lots of bug fixes. 

360 Enterprise Security Group, Endpoint Security, inc.   

[Go 1.17 Will Allow Converting a Slice to an Array Pointer](https://utcc.utoronto.ca/~cks/space/blog/programming/GoConvertSliceToArray) — Well, sometimes. 1.17 adds this ability without using `reflect` or `unsafe`, but there are some cautions to note. 

Chris Siebenmann  

📘 Tutorials and Stories  

[Writing Good Unit Tests; Don't Mock Database Connections](https://qvault.io/clean-code/writing-good-unit-tests-dont-mock-database-connections/) — While most of this post is 101 stuff, the take on mocking external dependencies might generate some opinions. 

Lane Wagner   

[Seven Years of Open-Source Database Development: Lessons Learned](https://www.philipotoole.com/7-years-of-open-source-database-development-lessons-learned/) — The developer of [rqlite](https://github.com/rqlite/rqlite), a Go-powered, distributed SQLite-backed database system, has some high-level reflections on what it’s like to work on such a project. 

Philip O'Toole   

[How to Scale Prometheus (Hint: It’s Not Prometheus)](https://go.lightstep.com/register-prometheus-scale-guide-co?utm_campaign=golang&utm_source=cooper&utm_medium=Email) 

Lightstep sponsor   

[Go Generics Beyond the Playground](https://dev.to/smyrman/go-generics-beyond-the-playground-353b) — Sindre attempts to rewrite a test matcher library using generics, diving into how they solved the problem pre-generics and what is possible now. 

Sindre Myren   

▶[Talking TCP and UDP with Adam Woodbeck](https://changelog.com/gotime/176) — Along with the author of [Network Programming with Go](https://nostarch.com/networkprogrammingwithgo), the Go Time podcast heads into the thorny weeds of networking with a look at two protocols that the entire Internet relies upon. 

Go Time Podcast podcast   

[Concurrent API Patterns in Go](https://tech.deliveryhero.com/concurrent-api-patterns-in-go/) — Five simple rules (using three steps) to follow for building concurrent, leak-free API code. 

Mark Salpeter    

Jobs  

[Senior Software Engineer at Even (Anywhere)](https://l.even.com/senior-swe-gw) — Help end the paycheck-to-paycheck cycle. Build w/ Go, React Native, GraphQL, Postgres, Bazel. Remote encouraged. 
Even   

[Senior Software Engineer (Go) - 100% Remote, UK/EU Only](https://www.form3.tech/careers/job-application?gh_jid=4003519002) — Solving complex technical challenges using the latest, cloud-native technologies to help Banks and FinTechs move money faster. 
Form3   

[Golang Developer at X-Team (Remote)](https://x-team.com/remote-go-developer-jobs/?utm_source=cooperpress&utm_medium=email-ad&utm_campaign=go) — Join the most energizing community for developers and work on long-term projects for Riot Games, FOX, Sony, Coinbase, and more. 
X-Team    

🛠 Code & Tools  

[Vugu: Vue-Like Frontends in Pure Go, HTML, and CSS](https://www.vugu.org/) — We called this ‘bleeding edge’ [two years ago](https://golangweekly.com/issues/256) and it’s still a pretty novel idea. Vugu targets WebAssembly, so it will work in the latest major browsers but is also still a bit gooey in the middle. More discussion [here on Hacker News](https://news.ycombinator.com/item?id=26836366). 

Vugu   

[Tunny: A Goroutine Pool Library](https://github.com/Jeffail/tunny) — A library for spawning and managing a pool of goroutines such as for when you need to limit the concurrent processing of jobs. 

Ashley Jeffs   

[Book a Demo. Ship Fast. Rest Easy. LaunchDarkly](https://learn.launchdarkly.com/demo/?utm_source=cooperpress&utm_medium=display&utm_campaign=21q1-cooperpress) — Testing in production is scary until it's not. Get control of your code to reduce risk & reclaim your nights and weekends. 

LaunchDarkly sponsor   

[xsek: An (Almost) Compliant XPath 1.0 Library](https://github.com/ChrisTrenkamp/xsel) — It’s really only missing one bit (but it adds others) and it’s extensible so you might be able to make “almost” into “entirely.” 

Chris Trenkamp   

[Fiber 2.8.0: An Express.js Inspired Web Framework](https://github.com/gofiber/fiber) — If you know Express (from the Node world) than Fiber will look _very_ familiar. 

Fiber   

[sx: Fast, Modern, Easy-to-Use Network Scanner](https://github.com/v-byte-cpu/sx) — Handles ARP, TCP, UDP, ICMP scans and more. 

v-byte-cpu   

[Raft 1.3.0: A Go Implementation of the Raft Consensus Protocol](https://github.com/hashicorp/raft) 
HashiCorp   

[gronx: Fast, Dependency-Free Cron Expression Parser](https://github.com/adhocore/gronx) 
Jitendra Adhikari       ![Jon Bodner](https://res.cloudinary.com/cpress/image/upload/v1619087400/bqzwonbgvgbfn5pdv8r4.png) 

💬 A Q&A with…
Jon Bodner
author of Learning Go, and engineer at Capital One  

Jon is an avid Gopher, author of the recently released _Learning Go_ book, and a Distinguished Engineer at Capital One, working on technical problems, code reviews, mentoring, and the odd spot of coding too. 

We caught up with him to ask a few questions about [his new book](https://www.oreilly.com/library/view/learning-go/9781492077206/), which came out last month: 

How did you end up writing _Learning Go_? [![Learning Go by Jon Bodner\](https://res.cloudinary.com/cpress/image/upload/v1619085110/tdnszyi7jssqoschsdxw.jpg)](https://www.oreilly.com/library/view/learning-go/9781492077206/) 

The short answer is that I went to a baseball game during GopherCon 2019. 

The longer answer is a chain of events: I spoke at GoCon Canada 2019 and Carmen Andoh from the Go team was there. We’d met before and I mentioned that I was interested in writing a book on Go for developers who were learning it as a second language. At GopherCon 2019, Carmen told me that there was an editor from O’Reilly and I should go talk to her. I met up with Zan McQuade, an acquisitions editor at O’Reilly, and talked about my ideas for a book. We are both big baseball fans, so we went to a Padres-Giants game along with a few other Gophers — we talked baseball and books. Then exchanged a couple of follow-up emails, I submitted a proposal, and it was accepted. 

What feature in Go do you think is underused by developers and deserves more attention? 

Wrapping errors and using errors as values and not just strings. Including contextual information and using types and instances of errors. 

What's your favorite Go idiom? 

I’ve really come to love implicit interfaces. I think they are actually the most important feature in Go. Implicit interfaces are type-safe duck typing, which is kind of the best of static and dynamic typing. 

What features in Go do you think most Go devs should avoid? 

I call out a few of them in the book. Complex numbers were an interesting idea, but they should probably be avoided. init functions are almost always the wrong choice, and declaring multiple init functions in the same package is certainly a bad idea. You probably shouldn’t use goto, but it’s there for rare corner cases. Naked returns are a bad idea. However, if I could remove one feature from Go, it’d be shadowing. Most of the time, you really don’t want a name in an inner scope to cover access to names in outer scopes. 

Do you have any plans to write another book one day? 

I’ve been telling people that my next book is going to be a romance novel. I figure there will be less time spent making sure that I got all of the details right.   

_You can find out more about Jon's work via [his GitHub profile](https://github.com/jonbodner) or see his [various talks on YouTube](https://www.youtube.com/playlist?list=PLIf8mMoyDnp7oucclwivToCtkOH7Z6bP7). He also [blogs over on Medium](https://medium.com/@jon_43067)._          

Curated by [Glenn Goodrich](https://twitter.com/ruprict) and [Peter Cooper](https://twitter.com/peterc). 

[Change your email address](https://golangweekly.com/edit_subscription/*|UID|*) or[Stop getting this newsletter](https://golangweekly.com/leave/*|UID|*) 

© Cooper Press Ltd · Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom
