summaryrefslogtreecommitdiffhomepage
path: root/tools/go_marshal/test/BUILD
diff options
context:
space:
mode:
authorAyush Ranjan <ayushranjan@google.com>2021-02-08 18:03:29 -0800
committergVisor bot <gvisor-bot@google.com>2021-02-08 18:08:29 -0800
commitcfa4633c3d206aa2f9abdaac60d053162244ee6d (patch)
treecddf8d20bde9b55bee4d510876b77af92dc635a3 /tools/go_marshal/test/BUILD
parente51f775cbb8db89d1dac6dcf584be5eef1f82d3c (diff)
[go-marshal] Add dynamic tag in go_marshal.
This makes it easier to implement dynamically sized types in go-marshal. You really only need to implement MarshalBytes, UnmarshalBytes and SizeBytes to implement the entire interface. By using the `dynamic` tag, the autogenerator will generate the rest of the methods for us. This change also simplifies how KernelIPTGetEntries implements Marshallable using the newly added utility. PiperOrigin-RevId: 356397114
Diffstat (limited to 'tools/go_marshal/test/BUILD')
-rw-r--r--tools/go_marshal/test/BUILD6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/go_marshal/test/BUILD b/tools/go_marshal/test/BUILD
index 4b27773c2..cb2d4e6e3 100644
--- a/tools/go_marshal/test/BUILD
+++ b/tools/go_marshal/test/BUILD
@@ -26,7 +26,10 @@ go_library(
srcs = ["test.go"],
marshal = True,
visibility = ["//tools/go_marshal/test:__subpackages__"],
- deps = ["//tools/go_marshal/test/external"],
+ deps = [
+ "//pkg/marshal/primitive",
+ "//tools/go_marshal/test/external",
+ ],
)
go_test(
@@ -36,6 +39,7 @@ go_test(
deps = [
":test",
"//pkg/marshal",
+ "//pkg/marshal/primitive",
"//pkg/syserror",
"//pkg/usermem",
"//tools/go_marshal/analysis",