It's using singleflight which was later on added to the Go std lib:
https://github.com/golang/groupcache/tree/master/singlefligh...
https://pkg.go.dev/golang.org/x/sync/singleflight
Just a note that `x/sync` is not part of the Go std lib.
Just a note that `x/sync` is not part of the Go std lib.