Thanks for bringing this up. It's a fair point.
Note though that it won't be possible to instantiate foo because there's
no type argument that would implement C; so it's not possible to get to an
incorrectly running program here.
We also don't report an error when a type set is empty.
But you ar
Hello gophers,
We have just released Go versions 1.17.8 and 1.16.15, minor point releases.
These minor releases include a security fix following the security policy:
-
regexp: stack exhaustion compiling deeply nested expressions
On 64-bit platforms, an extremely deeply nested expressio
The tip spec states that the core type of a constraint is born from the
type set of the constraint. https://tip.golang.org/ref/spec#Core_types
So the C constraint in the following program should have no core type,
because its type set is blank. But the foo function compiles okay,
which indicates
To identify failing test cases in a table of tests where you don't have
individual names you can use its index:
for i, testCase := range testCases {
t.Run(strconv.Itoa(i), func(t *testing.T) {
// ...
For debugging an individual test case, just skip over all but the failin
Go will have support for generics soon.
You won't need reflection anymore. \o/
https://github.com/samber/lo
On Friday, September 3, 2021 at 3:53:45 PM UTC+2 Howard C. Shaw III wrote:
> Just so you are aware of what's out there:
>
> https://github.com/robpike/filter
>
> "I wanted to see how hard
Just for curiosity, why 10ms?
Author told a answer.
See https://go-review.googlesource.com/c/go/+/8838/.
On Wednesday, March 2, 2022 at 11:46:20 PM UTC+8 Hans Allen wrote:
>
> It seems 10ms.
>
> Introduced originally in go1.2
> See https://codereview.appspot.com/10796043.
>
> On Monday, February