Secure Randomness in Go 1.22
The Go Programming Language Blog
by
1w ago
The Go Blog Secure Randomness in Go 1.22 Russ Cox and Filippo Valsorda 2 May 2024 Computers aren’t random. On the contrary, hardware designers work very hard to make sure computers run every program the same way every time. So when a program does need random numbers, that requires extra effort. Traditonally, computer scientists and programming languages have distinguished between two different kinds of random numbers: statistical and cryptographic randomness. In Go, those are provided by math/rand and crypto/rand, respectively. This post is about how Go 1.22 brings the two closer together, by ..read more
Visit website
Evolving the Go Standard Library with math/rand/v2
The Go Programming Language Blog
by
1w ago
The Go Blog Evolving the Go Standard Library with math/rand/v2 Russ Cox 1 May 2024 Since Go 1 was released in March 2012, changes to the standard library have been constrained by Go’s compatibility promise. Overall, compatibility has been a boon for Go users, providing a stable base for production systems, documentation, tutorials, books, and more. Over time, however, we’ve realized mistakes in the original APIs that cannot be fixed compatibly; in other cases, best practices and convention have changed. We need a plan for making important, breaking changes too. This blog post is about Go 1.22 ..read more
Visit website
Go Developer Survey 2024 H1 Results
The Go Programming Language Blog
by
1M ago
The Go Blog Go Developer Survey 2024 H1 Results Alice Merrick and Todd Kulesza 9 April 2024 Background This post shares the results of our most recent Go Developer Survey, conducted in January and February 2024. Along with capturing sentiments and challenges around using Go and Go tooling, our primary focus areas for this survey were about how developers are starting to use Go (or other languages) for AI-related use cases, and particular challenges for those who are learning Go or looking to expand their Go skill set. We recruited participants from the Go blog and through randomized prompts in ..read more
Visit website
More powerful Go execution traces
The Go Programming Language Blog
by
2M ago
The Go Blog More powerful Go execution traces Michael Knyszek 14 March 2024 The runtime/trace package contains a powerful tool for understanding and troubleshooting Go programs. The functionality within allows one to produce a trace of each goroutine’s execution over some time period. With the go tool trace command (or the excellent open source gotraceui tool), one may then visualize and explore the data within these traces. The magic of a trace is that it can easily reveal things about a program that are hard to see in other ways. For example, a concurrency bottleneck where lots of goroutine ..read more
Visit website
Robust generic functions on slices
The Go Programming Language Blog
by
2M ago
The Go Blog Robust generic functions on slices Valentin Deleplace 22 February 2024 The slices package provides functions that work for slices of any type. In this blog post we’ll discuss how you can use these functions more effectively by understanding how slices are represented in memory and how that affects the garbage collector, and we’ll cover how we recently adjusted these functions to make them less surprising. With Type parameters we can write functions like slices.Index once for all types of slices of comparable elements: // Index returns the index of the first occurrence of v in s ..read more
Visit website
Routing Enhancements for Go 1.22
The Go Programming Language Blog
by
3M ago
The Go Blog Routing Enhancements for Go 1.22 Jonathan Amsterdam, on behalf of the Go team 13 February 2024 Go 1.22 brings two enhancements to the net/http package’s router: method matching and wildcards. These features let you express common routes as patterns instead of Go code. Although they are simple to explain and use, it was a challenge to come up with the right rules for selecting the winning pattern when several match a request. We made these changes as part of our continuing effort to make Go a great language for building production systems. We studied many third-party web frameworks ..read more
Visit website
Go 1.22 is released!
The Go Programming Language Blog
by
3M ago
The Go Blog Go 1.22 is released! Eli Bendersky, on behalf of the Go team 6 February 2024 Today the Go team is thrilled to release Go 1.22, which you can get by visiting the download page. Go 1.22 comes with several important new features and improvements. Here are some of the notable changes; for the full list, refer to the release notes. Language changes The long-standing “for” loop gotcha with accidental sharing of loop variables between iterations is now resolved. Starting with Go 1.22, the following code will print “a”, “b”, and “c” in some order: func main() { done := make(chan bool ..read more
Visit website
Finding unreachable functions with deadcode
The Go Programming Language Blog
by
5M ago
The Go Blog Finding unreachable functions with deadcode Alan Donovan 12 December 2023 Functions that are part of your project’s source code but can never be reached in any execution are called “dead code”, and they exert a drag on codebase maintenance efforts. Today we’re pleased to share a tool named deadcode to help you identify them. $ go install golang.org/x/tools/cmd/deadcode@latest $ deadcode -help The deadcode command reports unreachable functions in Go programs. Usage: deadcode [flags] package... Example Over the last year or so, we’ve been making a lot of changes to the structure ..read more
Visit website
Go Developer Survey 2023 H2 Results
The Go Programming Language Blog
by
5M ago
The Go Blog Go Developer Survey 2023 H2 Results Todd Kulesza 5 December 2023 Background In August 2023, the Go team at Google conducted our bi-annual survey of Go developers. We recruited participants via a public post on the Go blog and a randomized prompt in VS Code, resulting in 4,005 responses. We primarily focused survey questions around a few topics: general sentiment and feedback about developing with Go, technology stacks used alongside Go, how developers start new Go projects, recent experiences with toolchain error messages, and understanding developer interest around ML/AI. Thank yo ..read more
Visit website
Fourteen Years of Go
The Go Programming Language Blog
by
6M ago
The Go Blog Fourteen Years of Go Russ Cox, for the Go team 10 November 2023 Today we celebrate the fourteenth birthday of the Go open source release! Go has had a great year, with two feature-filled releases and other important milestones. We released Go 1.20 in February and Go 1.21 in August, focusing more on implementation improvements than new language changes. Profile-guided optimization (PGO), previewed in Go 1.20 and released in Go 1.21, allows the Go compiler to read a profile of your program and then spend more time optimizing the parts of your program that run most often. In Go 1.21 ..read more
Visit website

Follow The Go Programming Language Blog on FeedSpot

Continue with Google
Continue with Apple
OR