Although first introduced in 2014, the Context package remains a crucial component of Go programming, enabling efficient management of request-scoped data, deadlines, and cancellation signals. As the Go ecosystem continues to evolve, understanding the Context package’s sem...
Happy February! Another release is here with several improvements across the board.
I’ve always found the signature of io.Reader a bit odd:
type Reader interface {
Read(p []byte) (n int, err error)
}
Why take a byte slice and write data into it? Wouldn’t it be simpler to create the slice
inside Read, load the data, and return it instead?
// Hypot...
I’ve always found the signature of io.Reader a bit odd:
type Reader interface {
Read(p []byte) (n int, err error)
}
Why take a byte slice and write data into it? Wouldn’t it be simpler to create the slice
inside Read, load the data, and return it instead?
// Hypot...
Understand why io.Reader takes a byte slice parameter instead of returning one. Learn about heap allocations and buffer reuse in Go streams.
For me the best way to learn something new is to actually build something with it. Yes, there is some hype around Zig nowadays (Ghostty, Bun are build in Zig), but don’t listen to it, go try it out and see for yourself if it solves your problem or not.
The Microsoft build of Go 1.24 ships with many new FIPS-140 related features. Here's a closer look at the upcoming changes.
The post Microsoft build of Go 1.24 FIPS changes appeared first on Microsoft for Go Developers.
A new release of the Microsoft build of Go including security fixes is now available for download.
The post Go 1.23.6-1 and 1.22.12-1 Microsoft builds now available appeared first on Microsoft for Go Developers.
Just like any other dynamically growable container structure, Go slices come with a few
gotchas. I don’t always remember all the rules I need to be aware of. So this is an attempt
to list some of the most common mistakes I’ve made at least once.
Slices are views over...
Just like any other dynamically growable container structure, Go slices come with a few
gotchas. I don’t always remember all the rules I need to be aware of. So this is an attempt
to list some of the most common mistakes I’ve made at least once.
Slices are views over...