Commit graph

5 commits

Author SHA1 Message Date
Roman Khimov
5bf00db2c9 io: move BinReader/BinWriter there, redo Serializable with it
The logic here is that we'll have all binary encoding/decoding done via our io
package, which simplifies error handling. This functionality doesn't belong to
util, so it's moved.

This also expands BufBinWriter with Reset() method to fit the needs of core
package.
2019-09-16 23:39:51 +03:00
Roman Khimov
aacf58c9ab util: add 'constructors' for BinReader/BinWriter
And an additional BufBinWriter to ease buffer management.
2019-09-16 23:38:48 +03:00
Roman Khimov
7b46f9bb86 util: add error check to Read/WriteVarUint
Fixes possibility of bogus reads/writes. Suggested by @im-kulikov.
2019-08-29 13:26:03 +03:00
Roman Khimov
672668b9fb util: use more consistent and explicit naming for BR/BW 2019-08-28 13:24:06 +03:00
Roman Khimov
6409cc753c util: move binaryReader/Writer from _pkg.dev
These are useful and nice.
2019-08-28 12:44:23 +03:00
Renamed from _pkg.dev/wire/util/binaryReader.go (Browse further)