---
title: "The smallest Go binary"
publication: "Go Weekly"
issue: 455
published_at: "2023-04-11"
canonical_url: "https://golangweekly.com/issues/455"
---

Plus what's new in GoLand, how to parse spreadsheets from Go, GoReleaser 1.17, and treating ourselves to some Gin. |        

#​455 — April 11, 2023 

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

ℹ️ As mentioned last time, _Go Weekly_ is now sent on _Tuesdays_, so if you missed us at all, we're now back on schedule 😄
__
_Peter Cooper, your editor_ 

Together with [![Teleport logo\](https://res.cloudinary.com/cpress/image/upload/c_fill,g_auto,w_280,h_60/e_make_transparent/co_white,e_outline:5/vr8quyt0q3vtxkpueewu.png)](https://goteleport.com/signup/?utm_campaign=eg&utm_medium=partner&utm_source=golang)  

The _Go Weekly_ Newsletter 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/cbcxcq04t5uaunonjwap.jpg)](https://totallygamerjet.hashnode.dev/the-smallest-go-binary-5kb)  

[The Smallest Go Binary - 5KB?](https://totallygamerjet.hashnode.dev/the-smallest-go-binary-5kb) — I thought this sounded a bit silly at first, especially dated April 1st, but the author (also the main maintainer of [purego](https://github.com/ebitengine/purego)) had an interesting use case: they wanted to use Go’s _assembler_ but not Go’s _runtime._ Turns out it’s possible, with a lot of fiddling around. **Note: You will almost certainly never need to do this yourself, but it's fun to see the parts involved in doing so.** 

Over Engineered   

[Developing a RESTful API with Go and Gin](https://go.dev/doc/tutorial/web-service-gin) — It’s neat to see a tutorial like this pop up on the official Go site. It walks through the basics of using [Gin](https://github.com/gin-gonic/gin) to create a simple RESTful API that stores its data in memory for simplicity. 

Official Go Docs   [![\](https://copm.s3.amazonaws.com/a7a0c665.png)](https://goteleport.com/signup/?utm_campaign=eg&utm_medium=partner&utm_source=golang) 

[What's Next in Kubernetes Access?](https://goteleport.com/signup/?utm_campaign=eg&utm_medium=partner&utm_source=golang) — Manage and audit access to all Kubernetes infrastructure - databases, clusters, and more - using biometrics rather than shared tokens and gain visibility on all actions in a K8s pod with full session recordings, all with a free trial of Teleport. 

Teleport | goteleport.com sponsor   

[FerretDB 1.0: An Open Source MongoDB Alternative](https://blog.ferretdb.io/ferretdb-1-0-ga-opensource-mongodb-alternative/) — FerretDB is an interesting project we’ve been following over the past year. Built in Go, it converts MongoDB’s wire protocol queries into SQL with Postgres on the backend, so you can reproduce the MongoDB experience but without its [controversial license change](https://www.protocol.com/enterprise/mongodb-open-source-database). 

Peter Farkas   

[What's New in GoLand 2023.1](https://www.jetbrains.com/go/whatsnew/) — GoLand is a popular (though commercial) IDE in the Go space, often coming in second only to VS Code, so it’s interesting to see what they’ve added. The latest version introduces a vulnerability checker and vulnerable package updater, improved gRPC tooling, and the ability to run ‘scratch’ files with non-standard-library packages. 

JetBrains   

**IN BRIEF:** 

- [Go 1.20.3 and Go 1.19.8](https://groups.google.com/g/golang-announce/c/Xdv6JL9ENs8/m/OV40vnafAwAJ) have been released.
- [Go 1.21 is likely to have a static toolchain](https://utcc.utoronto.ca/~cks/space/blog/programming/Go121LinuxStaticToolchain) on Linux, rather than dynamically linking against glibc.
- Over on Reddit, [a Go developer noticed](https://www.reddit.com/r/golang/comments/11spdom/go_is_23_times_slower_than_js_in_a_similar_code/) their Go code was running 2-3x slower than a JavaScript equivalent. People shared various optimizations with replacing all `int`s with `uint32` yielding the biggest improvement.
- No code, but it was interesting reading about [how Julia Evans approached building a zine feedback site](https://jvns.ca/blog/2023/03/31/zine-feedback-site/) with Go, SQLite and Vue.js.    

[How Do You Name Your Go Variables](https://lobste.rs/s/uqvzri/how_do_you_name_your_go_variables) — While this is a simple question on the surface, it often generates a ton of very strong opinions and lively discussion, as it did with the Lobsters community. 

Lobsters   

[Send Transactional Emails with Golang](https://www.courier.com/guides/golang-send-email/?utm_campaign=q1-fy23-cooper-press&utm_source=email&utm_medium=go-newsletter-4-11-23&utm_content=go-newsletter-blog-3-ways) — Step-by-step guide with three different methods: SMTP, 3rd party email provider, and with notification infrastructure. 

Courier.com sponsor   

[How to Secure a Go App with JWT](https://betterprogramming.pub/securing-your-golang-application-unleashing-the-power-of-authentication-and-authorization-94686e2fc683) — Authentication and authorization with middleware while staying stateless with REST. 

Dilara Görüm  

🛠 Code & Tools 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/menyu9osev5z6g5cfdjf.jpg)](https://xuri.me/excelize/)  

[Excelize: Library for Working with Excel Spreadsheets](https://xuri.me/excelize/) — Read and write XLAM / XLSM / XLSX / XLTM / and XLTX files. A long time library that keeps going from strength to strength. [GitHub repo](https://github.com/qax-os/excelize). 

QI-ANXIN GROUP   

[GoReleaser v1.17: Go Binary Build and Delivery Tool](https://carlosbecker.com/posts/goreleaser-v1.17) — The motivation for GoReleaser is to simplify the release process by building binaries for multiple platforms, creating a GitHub release, and even releasing a Homebrew formula. [GitHub repo](https://github.com/goreleaser/goreleaser). 

Carlos Alexandro Becker   

[Authorization Simplified with an Open-Source Authorizer Written in Go](http://www.topaz.sh/?utm_source=goweekly) — Topaz is a Go native authorization service with built-in support for every authorization model: RBAC, ABAC, and ReBAC. 

Aserto sponsor   

[Tokenizer: Pure Go Implementation of OpenAI's Tokenizer](https://github.com/tiktoken-go/tokenizer) — When you use OpenAI’s GPT, input and output is delivered in ‘tokens’ which are _not_ the same as characters, syllables or words, but somewhere in between. Trulymindboggling. 

Wahlmann and Wendt   

[bearclaw: A Tiny Static Site Generator](https://github.com/donuts-are-good/bearclaw) — _“makes converting markdown into websites easy.”_ Offers an RSS feed too. Possibly worth considering if you want something even simpler than [Hugo](https://gohugo.io/). 

bearclaw   

**QUICK RELEASES:** 

- [env 8.0](https://github.com/caarlos0/env)
 ↳ Parse environment variables into structs.
- [Go OpenAI 1.7](https://github.com/sashabaranov/go-openai)
 ↳ OpenAI / ChatGPT client library.
- [GoToSocial 0.8](https://github.com/superseriousbusiness/gotosocial)
 ↳ ActivityPub server powered by Go.
- [VHS 0.4](https://github.com/charmbracelet/vhs) – Record GIFs of terminal actions.
- [ws 1.2](https://github.com/gobwas/ws/releases/tag/v1.2.0) – Tiny WebSocket library.
- [gofumpt 0.5](https://github.com/mvdan/gofumpt/releases/tag/v0.5.0) – A stricter `gofmt`.
- [SFTPGo 2.4.5](https://github.com/drakkan/sftpgo) – Full featured SFTP server.
- [tdl 0.8](https://github.com/iyear/tdl) – Telegram file downloader.    

Jobs  

[Site Reliability Engineer](https://jobs.ashbyhq.com/stickermule/2482befb-4aa7-4372-98d7-042aaf774315?utm_source=Cooperpress) — Join our "kick ass" team. Our software team operates from 17 countries and we're always looking for more exceptional engineers. 
Sticker Mule   

[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=easy-job-hunting) — Hired makes job hunting easy-instead of chasing recruiters, companies approach you with salary details up front. Create a free profile now. 
Hired   

🧑‍💻 Got a job listing to share? _[Here's how](https://booking.cooperpress.com/jobs)_.     

🕰 ICYMI (_Some older stuff we might have missed_)  

[GitHub Actions and Go](https://olegk.dev/github-actions-and-go) — A CI workflow for Go you can reuse and tailor to your own needs. See the [final `build.yml`.](https://github.com/cristalhq/.github/blob/53335fadafd4a2409b342643789aea60465dbf40/.github/workflows/build.yml) 
Oleg Kovalov   

[Comprehensive Guide to Testing in Go](https://blog.jetbrains.com/go/2022/11/22/comprehensive-guide-to-testing-in-go/) — Covers things like table-driven tests, fuzzing, and parallel tests. 
Alexandre Couëdelo   

[Efficiently Writing Binary Data](https://hondu.co/blog/efficiently-writing-binary-data-golang) — _..or speeding up writing binary data in Go by 14x._ Serializing data structures is a common need, but in some cases you may need a more efficient option than `binary.Write`. 
Javier Honduvilla Coto   

[Speeding Up a CLI App with Concurrency](https://cuffaro.com/2023-03-20-go-concurrency/) 
Michael Cuffaro         

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
