Files
weave-scope/report/node_set.go
Bryan Boreham 261e33a3fa Call Must(En|De)code instead of (En|De)code to save time
Encode/Decode returns an error code, which we are generally not
checking for sub-objects because we never expect it to fail.  In the
new version of codegen Encode() sets up a panic handler and calls
MustEncode(), and the panic handler has a performance cost.  So just
call MustEncode() and if for some reason the encoding does fail we
will see it as a panic.

We still call Encode/Decode at top level and check the return code.
2017-12-12 18:42:23 +00:00

3.6 KiB