---
title: "Writing generic collection types"
publication: "Go Weekly"
issue: 513
published_at: "2024-07-02"
canonical_url: "https://golangweekly.com/issues/513"
---

Plus Russ Cox's new bot, using Go from JavaScript, and the River job queue gets a UI. |        

#​513 — July 2, 2024 

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

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)  

Go Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/cqmrne5ojogdnpjpk08h.jpg)](https://www.dolthub.com/blog/2024-07-01-golang-generic-collections/)  

[Writing Generic Collection Types: The Missing Documentation](https://www.dolthub.com/blog/2024-07-01-golang-generic-collections/) — Go 1.18 introduced generics, but the author found practical examples and documentation on creating generic collections to be lacking. Luckily, he’s done the experimentation for us and shares what he learnt after many hours of spinning his wheels on the problem. 

Zach Musgrave   

[Realtime Diagnostic Logging (or 'How to Really Spy on Your Go Web Apps')](https://evilmartians.com/chronicles/realtime-diagnostic-logging-or-how-to-really-spy-on-your-go-web-apps) — An exploration of some options to temporarily enable verbose logging for troubleshooting purposes and making those logs accessible from anywhere and in real-time. 

Vladimir Dementyev   [![\](https://copm.s3.amazonaws.com/1ea6f5f1.png)](https://www.ardanlabs.com/consulting/?utm_source=cooperpress) 

[Go! Unlock Your Tech Potential with Ardan Labs Consulting](https://www.ardanlabs.com/consulting/?utm_source=cooperpress) — Struggling with skill gaps, development speed or complex tech challenges? Ardan Labs specializes in Go, Rust, Docker and K8s to accelerate your software development, optimize architecture, and manage tech debt. Let us supercharge your team! 

Ardan Labs Consulting sponsor   

**IN BRIEF:** 

- 🤖 [Russ Cox is working on a bot](https://github.com/golang/go/discussions/67901) to help automate tasks in the Go issue tracker. The bot is called Gaby and you can [learn more about it here.](https://pkg.go.dev/rsc.io/gaby)
- ✖︎ [Tic-Tac-TUI?](https://github.com/ditpoo/tictactoe-tui) A Bubble Tea-powered, TUI-based 'noughts and crosses' game, all written in Go.
- 🇦🇺 [GopherConAU 2024](https://gophercon.com.au/) takes place in Sydney this November and [its CFP is now open](https://www.papercall.io/gopherconau2024) until September 15.   

[How to Use a Go Library on a Web Page with WebAssembly](https://tderflinger.com/en/how-to-integrate-go-library-js-webpage-webassembly) — Compiling Go code to WebAssembly opens up some interesting opportunities in the browser. 

Thomas Derflinger   

📄 [f-tests as a Replacement for Table-Driven Tests in Go](https://valyala.medium.com/f-tests-as-a-replacement-for-table-driven-tests-in-go-8814a8b19e9e) Aliaksandr Valialkin 

📄 [How to Do 'Hotword' Detection with Streaming Speech-to-Text and Go](https://www.assemblyai.com/blog/hotword-detection-with-assemblyai-streaming-speech-to-text/) – Leans on AssemblyAI’s platform. Yasoob Khalid 

📄 [A Silly Mistake I Made with `io.TeeReader`](https://vishnubharathi.codes/blog/a-silly-mistake-that-i-made-with-io.teereader/) Vishnu Bharathi 

📄 [gRPC: The Good Parts](https://kmcd.dev/posts/grpc-the-good-parts/) Kevin McDonald  

🛠 Code & Tools 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/xhhmy0gprtdaoqtkjkxf.jpg)](https://riverqueue.com/)   

[River: A Fast, Robust Job Queue for Go](https://riverqueue.com/) — A Postgres-backed background job system that encourages using the same database for your app and your jobs. [v0.8](https://github.com/riverqueue/river/releases/tag/v0.8.0) just landed, but the biggest recent addition is [River UI](https://riverqueue.com/blog/announcing-river-ui), a way to more directly monitor and visualize what River is up to. 

Brandur Leach et al.   

[SmoothMQ: A Drop-in Replacement for Amazon SQS](https://github.com/poundifdef/SmoothMQ) — Simple Queue Service (SQS) is a distributed message queuing service offered as part of AWS. SmoothMQ offers the same API but in a single Go binary. 

Jay Goel   

[Your Fastest Path to Production](https://render.com?utm_source=cooperpress&utm_medium=cooperpress) — Build, deploy, and scale your apps with unparalleled ease – from your first user to your billionth. 

Render sponsor   

🍪 [Cookie: Cookies, But With Structs](https://github.com/syntaqx/cookie) — Set, get, and remove cookies, both plaintext and signed. 

Chase Pierce   

- [lo 1.44](https://github.com/samber/lo) – Lodash-style Go library offering generic functions over slices, maps, channels, etc.
- [Chi 5.1](https://github.com/go-chi/chi) – Popular composable router for building Go HTTP services.
- [Vitess 20](https://planetscale.com/blog/announcing-vitess-20) – Go-powered horizontal scaling approach for MySQL.
- 📊 [go-echarts 2.4](https://github.com/go-echarts/go-echarts) – Charting and data visualization library.
- [GoBGP 3.28](https://github.com/osrg/gobgp) – BGP implementation in Go.
- [fx 35.0](https://github.com/antonmedv/fx/releases/tag/35.0.0) – Powerful terminal JSON viewer.  

🎁 And one for fun 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/mtbz4shghonkheftlgcd.jpg)](https://doggo.mrkaran.dev/docs/)  

[Doggo: A Go-Powered Command Line DNS Client](https://doggo.mrkaran.dev/docs/) — A DNS tool written in Go designed to be used at the terminal (not as a library). Well presented and a good example of a modern, Go-powered CLI tool. [GitHub repo.](https://github.com/mr-karan/doggo) 

Karan Sharma         

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
