зеркало из https://github.com/github/vitess-gh.git
14afc18998
I fixed this by changing the JSON marshaller of the vtctl commands: For protobuf messages we now use the "jsonpb" package which supports emitting fields with zero values. We already used this approach in the vtctld API endpoints. I've moved the code to the "vtctl" package to make it more generic. A drawback of this approach is that it doesn't cope well with our *Info objects e.g. ShardInfo because the type switch recognizes them as proto.Message and they have unexported fields which let jsonpb panic. To work-around this, I've changed the vtctl code to marshal only the embedded protobuf message and not the full *Info object anymore. |
||
---|---|---|
.. | ||
vtctld | ||
vtctld2 |