Index: service/datastore/serialize/invertible.go |
diff --git a/service/datastore/serialize/invertible.go b/service/datastore/serialize/invertible.go |
index 98ac514b9f7df4af4b8b2d9705f44f35df89343c..b71f96b511a13806736256415a5ef3efa5b0db33 100644 |
--- a/service/datastore/serialize/invertible.go |
+++ b/service/datastore/serialize/invertible.go |
@@ -12,6 +12,9 @@ import ( |
// that this package requires. |
type Buffer interface { |
String() string |
+ Bytes() []byte |
+ Len() int |
+ |
Grow(int) |
Read([]byte) (int, error) |
@@ -46,7 +49,7 @@ var _ Buffer = (*bytes.Buffer)(nil) |
// then you definitely don't need it! |
type InvertibleBuffer interface { |
Buffer |
- Invert() |
+ SetInvert(inverted bool) |
} |
type invertibleBuffer struct { |
@@ -110,6 +113,6 @@ func (ib *invertibleBuffer) ReadByte() (byte, error) { |
return ret, err |
} |
-func (ib *invertibleBuffer) Invert() { |
- ib.invert = !ib.invert |
+func (ib *invertibleBuffer) SetInvert(inverted bool) { |
+ ib.invert = inverted |
} |