mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2024-12-29 12:17:48 +00:00
492a476312
The use of math/rand in serialization is to provide some form of instability to the output to provide a clear signal to the user that the should not depend on the the property of stability. However, it is reasonable that users expect the output for these to be deterministic. As such, add a detrand package that provides deterministic, yet unstable randomization functionality. Since this package hashes the binary, it does impose a small initialization cost: Benchmark 100000 20712 ns/op 480 B/op 6 allocs/op Change-Id: I232d0fea1789a4278079837a67ee2f63474a4364 Reviewed-on: https://go-review.googlesource.com/c/151340 Reviewed-by: Herbie Ong <herbie@google.com> |
||
---|---|---|
.. | ||
go_type.go | ||
name_pure.go | ||
name_unsafe.go | ||
placeholder_type.go | ||
placeholder.go | ||
protofile_desc.go | ||
protofile_list_gen.go | ||
protofile_list.go | ||
protofile_type.go | ||
protofile.go | ||
standalone_type.go | ||
standalone.go | ||
stringer.go | ||
type_test.go | ||
validate.go |