protobuf-go/internal
Damien Neil 97e7f57dbb reflect/protoreflect: replace Mutable with NewMessage
Remove the Mutable methods from KnownFields, List, and Map, replacing
them with methods which return a new, empty message value without adding
that value to the collection.

The new API is simpler, since it clearly applies only to message values,
and more orthogonal, since it provides a way to create a value without
mutating the collection. This latter point is particularly useful in
map deserialization, where the key may be unknown at the time the value
is deserialized.

Drop the Mutable interface, since it is no longer necessary.

Change-Id: Ic5f3d06a2aa331a5d5cd2b4e670a3dba4a74f77c
Reviewed-on: https://go-review.googlesource.com/c/153278
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
2018-12-10 21:17:16 +00:00
..
cmd internal/typefmt: move descriptor formatting logic to typefmt 2018-12-05 22:14:52 +00:00
detrand internal/detrand: support disabling detrand 2018-11-29 07:49:45 +00:00
encoding internal/encoding/defval: unify logic for handling default values 2018-12-07 22:40:20 +00:00
errors internal/errors: initial commit 2018-08-02 18:28:47 +00:00
flags internal/flags: add package to control specialized functionality 2018-08-03 22:59:53 +00:00
impl reflect/protoreflect: replace Mutable with NewMessage 2018-12-10 21:17:16 +00:00
legacy reflect/protoreflect: add HasJSONName, ReservedRanges, and ReservedNames 2018-12-07 20:10:15 +00:00
pragma internal/pragma: package to statically enforce certain properties 2018-08-06 21:47:01 +00:00
protogen/goldentest cmd/protoc-gen-go: generate descriptor and plugin with reflection 2018-12-06 17:47:27 +00:00
scalar internal/scalar: add scalar package for primitive wrappers 2018-11-28 07:06:11 +00:00
set internal/set: add set package for set data structures 2018-08-09 21:46:35 +00:00
testprotos/legacy internal/impl: fix legacy logic to know about the new XXX_OneofWrappers method 2018-11-29 08:04:36 +00:00
typefmt reflect/protoreflect: add HasJSONName, ReservedRanges, and ReservedNames 2018-12-07 20:10:15 +00:00
value reflect/protoreflect: replace Mutable with NewMessage 2018-12-10 21:17:16 +00:00