1
0
Fork 0

Rename DataBuffer to BytesBuffer

This commit is contained in:
Gregory Eremin 2015-02-18 22:12:50 +07:00
parent 2aacc54376
commit d5663a7876
1 changed files with 4 additions and 4 deletions

View File

@ -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])