Files
Ayush RanjanandgVisor bot 43c2c00c50 Delete wire.Reader and wire.Writer.
These interfaces only existed to add ReadByte() and WriteByte() methods. There
were only 4 implementors of these methods: compressio.{Simple}{Reader/Writer}.
And there were only 2 users of this.

Using io.{Reader/Writer} is more extendible. For instance, it allows using
*os.File with the `wire` package without any wrappers.

Updated the 2 users to implement their own {read/write}Byte(). To avoid heap
allocation of the [1]byte storage during call to io.Reader.Read or
io.Writer.Write due to interface call, used sync.Pool. Earlier, calls to
compressio.Simple{Reader/Writer}'s implementation of {Read/Write}Byte would
cause a heap allocation.

PiperOrigin-RevId: 625167495
2024-04-15 19:40:27 -07:00

44 lines
812 B
Python

load("//tools:defs.bzl", "go_library", "go_test")
package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)
go_library(
name = "tests",
srcs = [
"array.go",
"bench.go",
"integer.go",
"load.go",
"map.go",
"register.go",
"struct.go",
"tests.go",
],
deps = [
"//pkg/state",
"//pkg/state/pretty",
],
)
go_test(
name = "tests_test",
size = "small",
srcs = [
"array_test.go",
"bench_test.go",
"bool_test.go",
"float_test.go",
"integer_test.go",
"load_test.go",
"map_test.go",
"register_test.go",
"string_test.go",
"struct_test.go",
],
library = ":tests",
deps = ["//pkg/state"],
)