DEV Community

Mario Carrion
Mario Carrion

Posted on β€’ Originally published at mariocarrion.com on

1

What is new in Go 1.16?

#go

Go 1.16 was officially released a few days ago πŸ’₯ πŸŽ‰ 🎊 !

And yes everybody is excited about the new //go:embed directive and the Apple Silicon support, but there are some other interesting changes.

Vet

Warns when calling Fatal in goroutines.

Go Modules

go install now supports arguments with suffixes, what this is means is that running something like:

go install github.com/MarioCarrion/nit/cmd/nit@v0.6.5
Enter fullscreen mode Exit fullscreen mode

Will work, and more importantly will not modify the main go.mod, which in practice should reduce the amount of explicit imported packages, that should change the tools.go paradigm a bit in some cases.

Deprecation of io/ioutil

io/ioutil still works but the recommended way is now to either use the corresponding io or os types, in practice the API is basically the same only the packages change.

os/signal NotifyContext

A new function called NotifyContext added, allows using context.Context for handling signal events, simplifying the previous channel-based pattern.


Looking forward to Go 1.17!

Sentry image

See why 4M developers consider Sentry, β€œnot bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay