summaryrefslogtreecommitdiffhomepage
path: root/tools/go_marshal/marshal/marshal.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-02-15 08:03:14 +0000
committergVisor bot <gvisor-bot@google.com>2020-02-15 08:03:14 +0000
commit4adf90d6944ec2bb7d16156ea2403740d24b4d01 (patch)
tree98c068cd885739f8b958a759b03b518d28b695f1 /tools/go_marshal/marshal/marshal.go
parent154d861542a4f64cfe49e2671f2c8c8c668bca99 (diff)
parent5cc0bbbafb2dc7d248bc3141b4cfa022d420abd1 (diff)
Merge release-20200211.0-27-g5cc0bbb (automated)
Diffstat (limited to 'tools/go_marshal/marshal/marshal.go')
-rwxr-xr-xtools/go_marshal/marshal/marshal.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/go_marshal/marshal/marshal.go b/tools/go_marshal/marshal/marshal.go
index e521b50bd..20353850d 100755
--- a/tools/go_marshal/marshal/marshal.go
+++ b/tools/go_marshal/marshal/marshal.go
@@ -48,6 +48,10 @@ type Marshallable interface {
// SizeBytes is the size of the memory representation of a type in
// marshalled form.
+ //
+ // SizeBytes must handle a nil receiver. Practically, this means SizeBytes
+ // cannot deference any fields on the object implementing it (but will
+ // likely make use of the type of these fields).
SizeBytes() int
// MarshalBytes serializes a copy of a type to dst. dst must be at least