Rename DataBuffer to BytesBuffer
This commit is contained in:
parent
2aacc54376
commit
d5663a7876
|
@ -6,21 +6,21 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
DataBuffer struct {
|
BytesBuffer struct {
|
||||||
input []byte
|
input []byte
|
||||||
size uint64
|
size uint64
|
||||||
pos uint64
|
pos uint64
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewDataBuffer(input []byte) *DataBuffer {
|
func NewBytesBuffer(input []byte) *BytesBuffer {
|
||||||
return &DataBuffer{
|
return &BytesBuffer{
|
||||||
input: input,
|
input: input,
|
||||||
size: uint64(len(input)),
|
size: uint64(len(input)),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *DataBuffer) Next() rune {
|
func (b *BytesBuffer) Next() rune {
|
||||||
var buf bytes.Buffer
|
var buf bytes.Buffer
|
||||||
for b.pos < b.size-1 {
|
for b.pos < b.size-1 {
|
||||||
buf.WriteByte(b.input[b.pos])
|
buf.WriteByte(b.input[b.pos])
|
Loading…
Reference in New Issue