Golang 1.21: What is new?



Golang 1.21: What is new?

Golang 1.21: What is new?

What is new in Golang 1.21? Compared to the 1.20 release, the Go team added new built-in functions to the language and new standard library packages. There are a lot of features, but there are seven I want to call out:

■ New “log/slog” package
■ Toolchain support
■ “go:debug” directive
■ New “min”, “max” and “clear” built-in functions
■ New “slices” package
■ New “maps” package
■ New functions in “context” package

■ Examples: https://github.com/MarioCarrion/videos/tree/609b7c26ef6e53738fa10cf9db25e3c3c4ac470b/2023/go-1-21-0
■ Learning Golang: Context package: Cancellations, Deadlines and Request-scoped values: https://youtu.be/mgJMIZsWfB4

== Installing

■ https://go.dev/dl/#go1.21
■ https://go.dev/doc/go1.21
■ All API changes: https://github.com/golang/go/issues/57126
■ “go install”: https://x.com/golang/status/1688934360731332608?s=20
■ MacOS Homebrew: brew upgrade go

== All Go/Golang Playlists

■ Software Architecture in Go/Golang: https://www.youtube.com/playlist?list=PL7yAAGMOat_GCd12Lrv_evJ3Zhv1dl8B-
■ Building Microservices in Go/Golang: https://www.youtube.com/playlist?list=PL7yAAGMOat_Fn8sAXIk0WyBfK_sT1pohu
■ Go/Golang Tools and Packages: https://www.youtube.com/playlist?list=PL7yAAGMOat_HEEOvH99agDs_5g51A0Ls3
■ Learning Concurrency Patterns in Go/Golang: https://www.youtube.com/playlist?list=PL7yAAGMOat_Fhj_px_DzNzTsXs-mRwv1t
■ Learning Go/Golang : https://www.youtube.com/playlist?list=PL7yAAGMOat_F7bOImcjx4ZnCtfyNEqzCy
■ Learning Relational Databases in Go/Golang: https://www.youtube.com/playlist?list=PL7yAAGMOat_EgwoQTvNUflrYL_4qzdB7f
■ Testing in Go/Golang: https://www.youtube.com/playlist?list=PL7yAAGMOat_HSeW4zF0uRL9EaHadE4ZZq

00:00 – Intro Golang 1.21
00:10 – How to install
00:42 – New “log/slog” package
00:58 – Toolchain support
01:38 – “go:debug” directive
03:35 – New “min”, “max” and “clear” built-in functions
05:05 – New “slices” package
06:12 – New “maps” package
07:19 – New functions in “context” package
11:14 – Conclusion

=== Who am I?

Hello 👋🏼! My name is Mario, and I am a Hands-on Software Architect and Lead Backend Engineer with decades of professional experience building all kinds of software, such as on-premise Automation Systems, Linux Accessibility Desktop Applications, Cloud Governance and Compliance Systems, and Distributed Cloud-based Advertising Systems.

The content I produce includes what I’ve learned while working for small startups and large companies and the processes I’ve followed for successfully delivering complex enterprise systems from start to end.

Subscribe if you like Software Development, Software Architecture, and Systems Design, and of course, Go!

Keep it up. Don’t give up!

#golang #tutorial #go121

=== Follow us along on Instagram for our family adventures

■ https://www.instagram.com/ruby_carrion/

=== Our affiliate links below

■ My Amazon Storefront: https://www.amazon.com/shop/rubycarrion
■ Shop my IG posts on my shopLTK page: https://www.shopltk.com/explore/RubyCarrion
■ Vlog camera: Sony RX100 VII https://amzn.to/3qQfvMc
■ Other vlog cameras and gear: https://rubycarrion.com/vlogcamerasandgear/
■ Shop through my links to support the channel: https://rubycarrion.com/shop-my-links/
■ Get a 30 day FREE Trial of Epidemic Sound: https://www.epidemicsound.com/referral/szx441/
■ Join Rakuten for FREE and get $30 when you spend $30: https://www.rakuten.com/r/RUBYRA132?eeid=28187

DISCLAIMER: Some of the links shared in the description are affiliate links. As a member of these affiliate programs, I earn a small commission from your purchases at no additional cost. I appreciate your support! 💖

Comments are closed.