---
title: "Google's got a Go style guide"
publication: "Go Weekly"
issue: 437
published_at: "2022-11-18"
canonical_url: "https://golangweekly.com/issues/437"
---

Plus more on the new logging format proposal, a Go Time milestone, and being a twirp. |        

#​437 — November 18, 2022 

[Unsub](https://golangweekly.com/leave/*|UID|*)|[Web Version](https://golangweekly.com/issues/437)  

Together with [![Ardan Labs\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/e_make_transparent/co_white,e_outline:7/uf5bdgdgdbgcbdrzi6r7.png)](https://www.ardanlabs.com/careers/mid-level-and-senior-backend-engineer.html/?utm_source=Cooperpress%20PrimaryV4)  

The _Go Weekly_ Newsletter 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/ob8kxtmwzapactaqyztz.jpg)](https://hmarr.com/blog/go-allocation-hunting/)  

[Making a Go Program 70% Faster with a One Character Change](https://hmarr.com/blog/go-allocation-hunting/) — How can you resist a title like that? This is the tale of tracking down a ‘silly mistake’ that led to a program running more slowly than it should have been. Slight spoiler: the character was `&` .. It also inspired [a Hacker News discussion.](https://news.ycombinator.com/item?id=33594676) 

Harry Marr   

[Google's Go Style Guide](https://google.github.io/styleguide/go/index) — What goes for Google doesn’t necessarily go for everyone else, but it’s interesting to see their stance on writing idiomatic Go. The [actual style guide is here](https://google.github.io/styleguide/go/guide) and is pretty short and sweet, focusing on clarify, simplicity and consistency as tenets. Over on Reddit, Google’s Matt Proud [noted](https://www.reddit.com/r/golang/comments/yy8edb/googles_internal_go_style_guide/iwtvoqv/) that this is early days and there’s still work to be done in sharing this work more widely. 

Google   [![\](https://copm.s3.amazonaws.com/d66ea58f.png)](https://www.ardanlabs.com/careers/mid-level-and-senior-backend-engineer.html/?utm_source=Cooperpress%20PrimaryV4) 

[Gophers - Opportunity is Knocking](https://www.ardanlabs.com/careers/mid-level-and-senior-backend-engineer.html/?utm_source=Cooperpress%20PrimaryV4) — We’re a premier software engineering firm looking for mid to senior level engineers to help us develop advanced software solutions and applications in Go. Got at least 1 year of professional Go experience and located in the Americas or Western Europe? We want to hear from you. 

Ardan Labs sponsor   

▶[A Consistent Logging Format for Go](https://www.youtube.com/watch?v=gd_Vyb5vEw0) — Last week we linked to the [structured logging proposal](https://go.googlesource.com/proposal/+/master/design/56345-structured-logging.md) but here’s its author selling it to you more directly in an 11-minute screencast if you find it easier to digest this way. 

Jonathan Amsterdam (Google)   

**IN BRIEF** 

- The _Go Time podcast_ has turned `math.Pow(2, 8)` episodes old! What better way to celebrate than with [▶️ an episode about gRPC and protocol buffers](https://changelog.com/gotime/256).
- The [first release candidate](https://blog.jetbrains.com/go/2022/11/17/goland-2022-3-release-candidate-is-out/) of JetBrains' _GoLand_ 2022.3 IDE is out.
- The NSA (the US intelligence agency) [recommends using Go](https://www.theregister.com/2022/11/11/nsa_urges_orgs_to_use/) instead of C or C++. Sort of. Not quite. Basically, languages like Go have the features needed to survive in a threatening dog-eat-dog world.   

[RPC in Go using Twitch's Twirp](https://thedevelopercafe.com/articles/rpc-in-go-using-twitchs-twirp-3dcb78ece775) — [Twirp](https://github.com/twitchtv/twirp) is like gRPC but somewhat easier to deploy and specifically focused on Go to Go use cases. Twitch [wrote more about it](https://blog.twitch.tv/en/2018/01/16/twirp-a-sweet-new-rpc-framework-for-go-5f2febbf35f/) at the project’s release in 2018. 

Gurleen Sethi   

▶[How To Compose Interfaces](https://www.youtube.com/watch?v=-gW7oSFxT2I) — A short (11-minutes) and sweet screencast on composability with interfaces. Anthony’s [channel](https://www.youtube.com/channel/UCIjIAXXsX4YMYeFj-LP42-Q/videos) is well worth a skim as he covers Go and Rust. Just two days ago he also released a screencast on [▶️ building a JSON API in Go](https://www.youtube.com/watch?v=xYCVQpqQh7Q). 

Anthony GG   

[Three Ways to Embed a Commit Hash in Go Programs](https://developers.redhat.com/articles/2022/11/14/3-ways-embed-commit-hash-go-programs) 
Panagiotis Georgiadis (Red Hat)  

🛠 Code & Tools 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/yg6tixevjnfro1apolfz.jpg)](https://github.com/1pkg/varint)  

[VarInt: Memory Efficient Arbitrary Bit Width Integers](https://github.com/1pkg/varint) — If, for some reason, you want to store a hundred 100 bit integers in exactly 10000 bits, this minimalist library is for you. It also provides some basic arithmetic and bitwise ops. 

Kostiantyn Masliuk   

[golang-lru: Fixed-Size Thread-Safe LRU Cache](https://github.com/hashicorp/golang-lru) — The latest release adds support for generics 🎉 

HashiCorp   

🍰 [Pie: A Utility Library for Dealing with Slices](https://github.com/elliotchance/pie) — Ways to work with slices with a focus on type safety, performance and immutability. 

Elliot Chance   

[Register for Unblock 22 - A CI/CD Conference by Buildkite](http://buildkite.com/unblock?utm_campaign=CPress&utm_source=ppc&utm_medium=Q4-GoNewsletter&utm_term=Unblock&utm_content=Sign-up) — Experience the 2-day virtual conference with industry experts who are defining the future of how we deliver software. 

Buildkite sponsor   

[Tamarin: An Embeddable Scripting Language Written in Go](https://github.com/cloudcmds/tamarin) — A simple language with a broadly JavaScript inspired syntax. The fantastic book **[📗 Writing an Interpreter in Go](https://interpreterbook.com/)** by Thorsten Ball is credited heavily by the author (and well worth reading for yourself, too.) 

Curtis Myzie   

[Mockery: A Mock Code Generator for Go Interfaces](https://github.com/vektra/mockery) — Why write boilerplate when Mockery can do it for you? 

Vektra   

[Sablier: An API for Running Containers on Demand](https://github.com/acouvreur/sablier) — .. and shutting them down automatically once there’s no activity. 

Alexis Couvreur   

[go-quartz: Simple, Zero-Dependency Scheduling Library](https://github.com/reugn/go-quartz) — Inspired by the similarly named [Quartz scheduler](https://github.com/quartz-scheduler/quartz) for Java. 

Eugene R.   

[Gorse: A Universal Open Source 'Recommender System'](https://gorse.io/) — Gorse uses ML to provide a RESTful API of recommendations based on the data you feed it. It includes a dashboard and API docs. 

zhenghaoz   

- [AWS Lambda for Go 1.35](https://github.com/aws/aws-lambda-go)
 ↳ Official serverless helpers for Go devs.
- [lo 1.35](https://github.com/samber/lo)
 ↳ Lodash-style library based on generics.
- [rqlite 7.11](https://github.com/rqlite/rqlite/releases/tag/v7.11.0)
 ↳ Distributed relational database atop SQLite.
- [Slashbase 1.1](https://github.com/slashbaseide/slashbase)
 ↳ Collaborative in-browser database IDE.
- [Chroma 2.4](https://github.com/alecthomas/chroma) — Pure Go syntax highlighter.
- [go-elasticsearch 8.5](https://github.com/elastic/go-elasticsearch) — Elasticsearch client.
- [fzf 0.35](https://github.com/junegunn/fzf/releases/tag/0.35.0) — Command-line fuzzy finder.
- [go-github 48.1](https://github.com/rqlite/rqlite/releases/tag/v7.11.0) — GitHub v3 API client.    

Jobs  

[Find a Job Through Hired](https://hired.com/join/?utm_source=newsletter&utm_medium=sponsor&utm_campaign=%28b2c%29%28l-all%29%28r-all%29%28cooper-golangweekly%29&utm_content=find-your-next-job) — Create a profile on Hired to connect with hiring managers at growing startups and Fortune 500 companies. It's free for job-seekers. 
Hired   

[Golang Engineers — 100% Remote (North/South America & Europe)](https://www.ardanlabs.com/careers/mid-level-and-senior-backend-engineer.html) — We’ve got several opportunities for Go devs and would love to hear from those looking for new challenges in distributed systems projects. 
Ardan Labs            

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

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

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