mmcgrana / gobyexample

Go by Example
https://gobyexample.com
7.18k stars 1.26k forks source link

Updating the Content for New Go 1.21 Features #481

Closed ab7z closed 1 year ago

ab7z commented 1 year ago

I wanted to bring to your attention the recent release of Go version 1.21 and the exciting new features it brings to the language. I believe it would greatly benefit the Go community if the website is updated to include explanations and examples of these new features.

eliben commented 1 year ago

Yes, indeed, this is planned.

Ideas and PRs will be appreciated

eliben commented 1 year ago

https://github.com/mmcgrana/gobyexample/commit/2166e61181f712d4a7c8a29b019fe7d122ffc8a3 and https://github.com/mmcgrana/gobyexample/commit/655a3b6a9e216972337ccab5c124142d2ad71a83 update the sorting samples to use new functionality from the slices package

eliben commented 1 year ago

Here's a list of ideas of the updates needed, with marking of stuff done:

Other topics I'm much less sure about:

eliben commented 1 year ago

slices and maps examples added in https://github.com/mmcgrana/gobyexample/commit/146bd9cce2d3d89fac28f4f6334d9b2acbed7dee

eliben commented 1 year ago

log/slog (and log itself) added in https://github.com/mmcgrana/gobyexample/commit/15d8fe75b82f488461a0bb219e555bfccb999b08