3 ms·
I’m not familiar with protobufs, but zero and nil are different types in Go. You can’t even compare a numeric type with a reference type (it’s a compiler error)
by throwaway894345 4y ago
I’m not familiar with protobufs, but zero and nil are different types in Go. You can’t even compare a numeric type with a reference type (it’s a compiler error).
- tommiegannert 4y agoGP meant that you can't differentiate between the zero-value and "not present". In proto2, strings were represented as *string in Go. In proto3, they are simply string, and "" is the default.