]> Cypherpunks repositories - gostls13.git/commit
internal/pkgbits: add Version type
authorTim King <taking@google.com>
Wed, 14 Aug 2024 19:34:32 +0000 (12:34 -0700)
committerTim King <taking@google.com>
Tue, 20 Aug 2024 21:55:59 +0000 (21:55 +0000)
commit830621bc09c175d1b87496fd1be79bdcd1ce27c8
treee00c1bb5234e61703f166935f7df97788c7d3199
parent54c948de9a18949c88b1453d3288253f86256ce9
internal/pkgbits: add Version type

Adds a new Version type to pkgbits to represent the version of the
bitstream. Versions let readers and writers know when different data is
expected to be present or not in the bitstream. These different pieces
of data are called Fields, as an analogy with fields of a struct.
Fields can be added, removed or changed in a Version. Extends Encoder
and Decoder to report which version they are.

Updates #68778

Change-Id: Iaffa1828544fb4cbc47a905de853449bc8e5b91f
Reviewed-on: https://go-review.googlesource.com/c/go/+/605655
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
src/internal/pkgbits/decoder.go
src/internal/pkgbits/encoder.go
src/internal/pkgbits/pkgbits_test.go [new file with mode: 0644]
src/internal/pkgbits/version.go [new file with mode: 0644]