---
title: "Go on the Xbox?"
publication: "Go Weekly"
issue: 453
published_at: "2023-03-24"
canonical_url: "https://golangweekly.com/issues/453"
---

Plus the power of single method interfaces, a new way to optimize structs, and a simple parser package built upon struct field tags. |        

#​453 — March 24, 2023 

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

Together with [![Ardan Labs\](https://res.cloudinary.com/cpress/image/upload/e_make_transparent/co_white,e_outline:7,q_auto/uf5bdgdgdbgcbdrzi6r7.png)](https://www.ardanlabs.com/consulting/?utm_source=cooperpress)  

The _Go Weekly_ Newsletter 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/cr4veozufpexbvtofnav.jpg)](https://github.com/dkorunic/betteralign)  

[Make Your Go Programs Use Less Memory.. Maybe](https://github.com/dkorunic/betteralign) — betteralign is a tool to detect structs that would use less memory if their fields were sorted and to then, optionally, sort such fields. It’s a fork of Go’s own [fieldalignment](https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/fieldalignment) tool that skips generated or test files, skips specially marked structs, doesn’t drop comments, and similar DX enhancements. 

Dinko Korunic   

[Implementing a Generic Set Type](https://bitfieldconsulting.com/golang/generic-set) — To celebrate the first anniversary of generics in Go (Go 1.18 was released in March 2022), John decided to build something useful with them: a generic Set type, complete with useful methods. 

John Arundel   [![\](https://copm.s3.amazonaws.com/bcc68a3c.png)](https://www.ardanlabs.com/consulting/?utm_source=cooperpress) 

[Go! Experts at Your Service](https://www.ardanlabs.com/consulting/?utm_source=cooperpress) — Do you need help filling skill gaps, speeding up development & creating high performing software with Go, Docker, K8s, Terraform and Rust? We’ll help you maximize your architecture, structure, tech-debt and human capital. 

Ardan Labs Consulting sponsor   

[The Power of Single-Method Interfaces](https://eli.thegreenplace.net/2023/the-power-of-single-method-interfaces-in-go/) — Eli shows why single-method interfaces (sometimes called SMIs) can do whatever higher order functions can do and more, and why they provide a more general and powerful approach even if they’re more verbose in some cases. 

Eli Bendersky   

🕹 [Ebitengine 2.5: The 2D Game Engine for Go](https://ebitengine.org/en/documents/2.5.html) — v2.5 of the long standing library includes **initial, limited Xbox support,** extra vector drawing functions, improved control over the blending of graphics and colors, and more. [Project homepage](https://ebitengine.org/). 

Ebitengine Team   

[`a[low:high:max\]` — An Uncommon Slice Trick](https://build-your-own.org/blog/20230316_go_full_slice/) — You might be used to seeing a slice like `a[low:high]` but what about one with a _third_ index? This third index can be used for setting the capacity of a slice and James quickly shows it off here. 

James Smith   

**IN BRIEF:** 

- Go cryptography expert Filippo Valsorda has outlined [the plans around cryptography work in Go 1.21.](https://words.filippo.io/dispatches/go-1-21-plan/) It's detailed but essential stuff.
- Be aware that GitHub has [changed their RSA SSH host key](https://github.blog/2023-03-23-we-updated-our-rsa-ssh-host-key/) so you may see a warning when pushing, pulling or cloning.
- Congratulations to the [London Gophers group](https://gophers.london/) celebrating their [tenth anniversary](https://twitter.com/matryer/status/1638470606638182401) this week.
- Preslav Rachev wonders [why Go hasn't got an equivalent of Spring](https://preslav.me/2023/03/23/where-is-the-spring-framework-for-golang/) (a large scale app framework in the Java world).    

[Replay 2023: Call for Presenters Is Now Open!](https://t.mp/replay-2023-cfp-cooperpress) — It’s our 2nd year of Replay and we want you to be a part of it! Check out our blog post on why you should submit your exciting talk today. 

Temporal Technologies sponsor   

[Synchronization Patterns in Go](https://code-pilot.me/synchronization-patterns-in-go) — A concise article that plays a little with mutexes, semaphores, channels, and problems that can occur like race conditions. 

Noam Yadgar   

[How We Solved an OOM Issue in TiDB with `GOMEMLIMIT`](https://dzone.com/articles/how-we-solved-an-oom-issue-in-tidb-with-gomemlimit) — `GOMEMLIMIT`, introduced in Go 1.19, is a variable for setting a soft memory limit for the Go runtime. 

Xiqian Shao   

[The Simplicity of Single-File Go Deployments](https://www.amazingcto.com/simplicity-of-golang-systemd-deployments/) 
Stephan Schmidt  

🛠 Code & Tools  

[Participle 2.0: A Simple Parser Package](https://github.com/alecthomas/participle) — Aims to provide a straightforward and idiomatic way to define parsers in Go using a familiar approach of using struct field tags to define a grammar, so if you’ve used `encoding/json` before, you’re well on your way. 

Alec Thomas   

[v8go 0.9.0: Execute JavaScript from Go](https://github.com/rogchap/v8go) — Lets you create V8 contexts and run code `eval`-style. v0.9 updates the V8 versions supported (10.9 and 11.1). 

Roger Chapman   

[Go OpenAI: Use OpenAI's APIs from Go](https://github.com/sashabaranov/go-openai) — Provides access to ChatGPT, GPT-3, GPT-4, DALL-E, and Whisper. Formerly known as `go-gpt3`. 

Sasha Baranov   

[O’Reilly’s Identity-Native Infrastructure Access for Kubernetes](https://goteleport.com/resources/books/identity-native-infrastructure-access-management/?utm_campaign=eg&utm_medium=partner&utm_source=golang) — Get your free copy to learn about identity-based infrastructure access and how it differs from secret-based approaches. 

TELEPORT | goteleport․com sponsor   

[hot-reload: Hot Reload Development for Go in Docker Containers](https://github.com/dkfbasel/hot-reload) — Just a bit of configuration, and you’re off. (Also, we love that a hospital open-sourced this.) 

Departement of Clinical Research, University Hospital Basel   

[Frenzy: Postgres Wire Protocol Aware Mirroring Proxy](https://github.com/kellabyte/frenzy) — It’s early days for this Go-based Postgres proxy, but it’s fun to see something at this stage that does actually work and may be useful if you need to build something similar of your own.. _“It’s suuuuuper hacky but in 2 hours of work I was able to proxy some queries!”_ 

Kelly Sommers   

- [Chroma 2.7](https://github.com/alecthomas/chroma)
 ↳ Pure Go general purpose syntax highlighter.
- [Listmonk 2.4](https://github.com/knadh/listmonk)
 ↳ Newsletter and mailing list manager.
- [Go Micro 4.10](https://github.com/go-micro/go-micro)
 ↳ Microservices framework.
- [Gitea 1.19](https://github.com/go-gitea/gitea)
 ↳ Go-powered self-hosted Git forge.
- [SSE 2.10](https://github.com/r3labs/sse)
 ↳ Server Sent Events server and client library.
- [go-github 50.2](https://github.com/google/go-github)
 ↳ GitHub API v3 client library.
- [Wish 1.1](https://github.com/charmbracelet/wish)
 ↳ Build custom SSH server apps.
- [Log 0.2](https://github.com/charmbracelet/log)
 ↳ Minimal, colorful logging library.    

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** _(Older stuff we may have missed...)_ 

- Jonathan Hall shows us [▶️ how to bootstrap a Go project for CI/CD with GitLab](https://www.youtube.com/watch?v=-CbXTBX0dbo).
- A benchmark from Markus Wüstenberg extolls [the production virtues of SQLite performance](https://www.golang.dk/articles/benchmarking-sqlite-performance-in-go) in Go.
- Derek Parker looks at [how debugging Go programs with Delve and EBPF](https://developers.redhat.com/articles/2023/02/13/how-debugging-go-programs-delve-and-ebpf-faster) "is faster" (than ptrace).
- A golden-oldie [▶️ 20-minute talk from Bryan Boreham](https://www.youtube.com/watch?v=NS1hmEWv4Ac) on how to measure the performance of your Go code, garbage collection, and reducing memory allocations.
- Kevin Kelche shares a diagram heavy explanation of [how the runtime scheduler works](https://www.kelche.co/blog/go/golang-scheduling/).         

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
