---
title: "Go's three new builtin functions"
publication: "Go Weekly"
issue: 466
published_at: "2023-06-27"
canonical_url: "https://golangweekly.com/issues/466"
---

Plus running Go in Jypyter Notebooks, a Go app generator, and using htmx with Go. |        

#​466 — June 27, 2023 

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

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/mdxi20raub1ssisovdyc.jpg)](https://go.dev/blog/go1.21rc)  

[Go 1.21 Release Candidate](https://go.dev/blog/go1.21rc) — Despite merely being in RC (the final release is expected in August), Go 1.21 fever is high right now. Set to be the biggest release since 1.18, there are [a lot of good reasons](https://tip.golang.org/doc/go1.21) to be excited this time, including: 

- The new [`log/slog` package](https://pkg.go.dev/log/slog@master) for structured logging.
- A preview of [a change to `for` loop variable semantics.](https://github.com/golang/go/wiki/LoopvarExperiment)
- Improvements to type inference for generic functions.
- Profile Guided Optimization (PGO) going GA.
- An experimental WASI port ([sample code](https://github.com/meteatamel/wasm-basics/tree/main/samples/go-wasm))
- Plus a lot more, and.... ↓ 

Eli Bendersky   

[Built-in Functions in Go 1.21](https://antonz.org/go-1-21-builtins/) — Some new builtin functions in Go 1.21 caught Anton's eye: `min`, `max`, and `clear`. Thankfully, even with these additions, there are still [fewer than 20 in total](https://pkg.go.dev/builtin) to remember. 

Anton Zhiyanov   [![\](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   

▶[Using htmx with Go to Make Full Stack Apps](https://www.youtube.com/watch?v=F9H6vYelYyU) — If you see React, Angular, or similar frontend frameworks and feel the panic rising, [htmx](https://htmx.org/) provides an interesting lighter-weight alternative that’s more modern and, luckily, has more street cred than jQuery. 

BugBytes   

**IN BRIEF:** 

- 🇪🇺 [GopherCon EU](https://gophercon.eu/) is taking place in Berlin _right now._ Hope you're having fun if you're there!
- Damien Neil wonders if [we should move Go's HTTP/2 client and server implementations](https://github.com/golang/go/discussions/60746) directly into the standard library (i.e. from `x/net/http2` to `net/http/internal/http2`)
- We recently featured an [update to the Go toolchain policy](https://go.dev/doc/toolchain) around future versions of Go downloading and using different versions of the toolchain when needed. Chris Siebenmann writes more on the matter in [Go 1.21 will (probably) download newer toolchains on demand by default](https://utcc.utoronto.ca/~cks/space/blog/programming/Go121ToolchainDownloads).
- The _Go Time_ podcast discusses the topic of neurodiversity in the latest episode: [▶️ Neurodiverse Gophers](https://changelog.com/gotime/281)    

[Solving 'Two Sum' in C (and Go) with a Tiny Hash Table](https://nullprogram.com/blog/2023/06/26/) — If you’re up for a simple algorithmic puzzle, this is for you. The author comes up with an efficient solution for something that initially appears to have quadratic complexity. 

Chris Wellons   

▶[Safe, Fast, and Easy: Building a Plugin System with WebAssembly](https://www.youtube.com/watch?v=pRT36VqpljA) — The creator of [sqlc](https://github.com/kyleconroy/sqlc) demonstrates a way to introduce plugins into a Go app in a secure, fast way with WebAssembly. 

Kyle Conroy   

⏰ [Time is Not a Synchronization Primitive](https://xeiaso.net/blog/nosleep) — I imagine we’ve all been guilty of sleeping-in our code in order to “make sure” something else has had an opportunity to run, despite no guarantees it will! 

Xe Iaso   

[How to Hack Kubernetes (and How to Protect It)](https://goteleport.com/blog/how-to-hack-kubernetes/?utm_campaign=0308HackK8sBlog&utm_medium=partner&utm_source=golang) — This roundup covers the top 7 ways your cluster is likely to be attacked, with a corresponding countermeasure for each. 

Teleport | goteleport․com sponsor   

[How We Scaled to 100 Million Active Users Using Kafka and Go](https://itnext.io/how-we-scaled-to-100-million-active-users-using-kafka-and-golang-eventual-consistency-6241cfeba7e8) 
Mohammad Hoseini Rad   

[Taking a Closer Look at `io.SectionReader`](https://mustafanafizdurukan.github.io/posts/taking-closer-look-at-io-sectionreader/) 
Mustafa Durukan  

🛠 Code & Tools 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/thkkkm1y5ai0n0an16eu.jpg)](https://github.com/janpfeifer/gonb)  

[GoNB: A Go Notebook Kernel for Jupyter](https://github.com/janpfeifer/gonb) — In the Python world, you'll often see a “notebook” style of development where code is written and executed in a cross between a document and a REPL. Here’s a way to run Go in the same environment. Check out [this welcome document](https://github.com/janpfeifer/gonb/blob/main/examples/tutorial.ipynb) to see the potential _(note: the notebook itself doesn’t run on GitHub)._ 

Jan Pfeifer   

[Create Go App CLI 4.0: Create a New Go Project in One](https://github.com/create-go-app/cli) — Imagine [Create React App](https://github.com/facebook/create-react-app) but for putting together a production-ready Go project with backend, frontend _and_ deployment automation ready to go. It’s opinionated, naturally. 

Create Go App   

[FusionAuth + Go – You’re Welcome](https://fusionauth.io?utm_source=gonewsletter&utm_medium=newsletter&utm_campaign=awareness) — Add login, registration, SSO, MFA and more with our Go client library with just two lines of code. 

FusionAuth sponsor   

[Dkron: A Cloud Native Job Scheduling System](https://dkron.io/) — A Go-powered system service for workload automation, running scheduled jobs, etc. Think cron but able to run in cluster form. [GitHub repo.](https://github.com/distribworks/dkron) LGPL licensed with a pro option. 

Distributed Works   

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/nxfgib7ijbeu4xjwsq5e.jpg)](https://github.com/hionay/tailer)  

[tailer: CLI Tool to Insert Lines When Command Output Stops](https://github.com/hionay/tailer) — The idea is simple. Pipe the output of something else into `tailer` and it will output its own lines during quiet moments to both show the gaps and that things are still working. Inspired by the Rust variant, [spacer.](https://github.com/samwho/spacer) 

Halil ibrahim Onay   

[Lingua 1.3: A Natural Language Detection Library](https://github.com/pemistahl/lingua-go) — Got text? Lingua will tell you which language it’s written in. Lingua supports long and short texts and handles over 70 languages. It’ll add over 100MB of weight to your project, though, but keeps everything local. 

Peter M. Stahl     

Jobs  

[Join the Gno.land Team](https://docs.google.com/forms/d/e/1FAIpQLSexAk7JObOd6FSQXm6Qx91DXYKCgqo65NXdRIZXn6-EatL4Ew/viewform) — Get to gno us! Sign up for a Q&A with our team to learn about joining [Gno.land](https://gno.land/) and building the next-gen smart contract platform. 
Gno.land   

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

- [ImmuDB 1.5](https://github.com/codenotary/immudb/releases/tag/v1.5.0)
 ↳ Immutable, zero trust database now with MVCC.
- [ObjectBox Go Database 1.7](https://github.com/objectbox/objectbox-go)
 ↳ Simple, native struct persistence.
- [OpenGist 1.4](https://github.com/thomiceli/opengist)
 ↳ Self-hosted GitHub Gist-style pastebin.
- [Official MongoDB Go Driver 1.12](https://github.com/mongodb/mongo-go-driver/releases/tag/v1.12.0)
 ↳ Adds MongoDB 7.0 support.
- [QUIC Go 0.36](https://github.com/quic-go/quic-go/releases/tag/v0.36.0)
 ↳ Adds Generic Segmentation Offload (GSO) support.         

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
