Mateusz Poliwczak

Results 81 comments of Mateusz Poliwczak

I think that if we go with this this should be a: ```go var Expired error = expiredError{} ``` And then we can define an `Is` method. So the use...

> Now that there's WithCancelCause / WithDeadlineCause / WithTimeoutCause, a context may be canceled without matching either error. Cause errors are only returned through `context.Cause(err)`, and i don't think that...

Also same thing happens with field embeding, i once noticed that [binary.NativeEndian](https://pkg.go.dev/encoding/binary#NativeEndian) has bigger inlining cost than [binary.LittleEndian](https://pkg.go.dev/encoding/binary#LittleEndian)/[binary.BigEndian](https://pkg.go.dev/encoding/binary#BigEndian), even though it looks like this: https://github.com/golang/go/blob/ef3e1dae2f151ddca4ba50ed8b9a98381d7e9158/src/encoding/binary/native_endian_little.go#L9-L14

From your docs it seems like the `RegisterCustomHash` accepts a Hash parametr, so the caller has to decide on the value. What if two packages use the same one? I...

I also have a feeling that the `convertToNonTupleLike` makes the code hard to reason about, i removed them in https://github.com/ziglang/zig/compare/ziglang:zig:master...mateusz834:zig:remove-convertToNonTupleLike?expand=1 Let me know what you think about this, i can...

This seems to happen here: https://github.com/golang/go/blob/6853d89477e0886c7c96b08e7efaf74abedfcf71/src/crypto/x509/parser.go#L389-L397 And the URL seems to be invalid, see simpler reproducer https://go.dev/play/p/IMYvwnRjF7F CC @neild (as per https://dev.golang.org/owners for net/url) not sure how to judge that...

I am in favour of this change (with the Kind prefix), because these kinds of constants are autocompleted by gopls, thus it is easier to work with them.

Personally, i would change the names to: ```diff - KindBeginObject Kind = '{' - KindEndObject Kind = '}' - KindBeginArray Kind = '[' - KindEndArray Kind = ']' + KindObjectBegin...

Yeah, I think that if we go with constants it should be using iota.