Russ Cox
Russ Cox
This is clearly a very common operation that we should make easier. The only discussion seems to be whether to include the error in the function signature. So maybe there...
To try to move things forward, what do people think of ``` type OnceValue[T any] struct { ... } func (*OnceValue[T]) Do(func() T) T type OnceValueErr[T any] struct { ......
One type, two methods seems out-of-place, because you have to call one of the methods consistently to use it correctly. If there are goroutines racing (this is package sync) and...
I think we have established that we should probably support both T and (T, error) results, and that those should be different APIs, not a single one that appears to...
There are 157 sync.Once declarations in the main repo, and there are a few different patterns that uses can be grouped into. ### Pattern 1: Side Effects (25 of 157,...
When I reread @adg's top comment and started thinking about the closure-based API, I was fairly skeptical. I'm a bit uncomfortable with the type of this functionality being a plain...
One final note: a few people have mentioned that objects with methods are more "idiomatic" in Go than functions, but we do from time to time learn better ways to...
There are two suggestions here. (1) Add ServeFSContent(w, r, info, content) next to ServeContent(w, r, name, modtime, content), where info replaces name+modtime and content is loosened from ReadSeeker to Reader....
This proposal has been added to the [active column](https://golang.org/s/proposal-status#active) of the proposals project and will now be reviewed at the weekly proposal review meetings. — rsc for the proposal review...
Retitled to be just about ServeFSFile. Does anyone object to adding that?