summaryrefslogtreecommitdiffhomepage
path: root/tools/go_marshal/marshal
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-02-14 18:31:55 -0800
committergVisor bot <gvisor-bot@google.com>2020-02-14 18:32:49 -0800
commit3d32ad1367b4e84a0822808f44bd7b9f9351db71 (patch)
treebde25ab2c5632dd1ae3497b760b5e3f4bd18c4a9 /tools/go_marshal/marshal
parenta5069f820f22734b6c466068a02bbbe83ba091da (diff)
Generate implementation of io.WriterTo via go-marshal.
PiperOrigin-RevId: 295269654
Diffstat (limited to 'tools/go_marshal/marshal')
-rw-r--r--tools/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 10614ec4d..e521b50bd 100644
--- a/tools/go_marshal/marshal/marshal.go
+++ b/tools/go_marshal/marshal/marshal.go
@@ -21,6 +21,8 @@
package marshal
import (
+ "io"
+
"gvisor.dev/gvisor/pkg/usermem"
)
@@ -42,6 +44,8 @@ type Task interface {
// Marshallable represents a type that can be marshalled to and from memory.
type Marshallable interface {
+ io.WriterTo
+
// SizeBytes is the size of the memory representation of a type in
// marshalled form.
SizeBytes() int