Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
rename exported function names
Browse files Browse the repository at this point in the history
  • Loading branch information
keisku committed Apr 19, 2022
1 parent 9dab6dd commit cfc75fc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ if err != nil {
fmt.Printf("header: %v\n", h)

iter := d.Iterator()
for iter.HasNext() {
t, v := iter.Next()
for iter.Next() {
t, v := iter.At()
fmt.Println(t, v)
}

Expand Down
8 changes: 4 additions & 4 deletions decompressor.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ type DecompressIterator struct {
d *Decompressor
}

// Next returns decompressed time-series data.
func (di *DecompressIterator) Next() (t uint32, v float64) {
// At returns decompressed time-series data.
func (di *DecompressIterator) At() (t uint32, v float64) {
return di.t, di.v
}

Expand All @@ -58,8 +58,8 @@ func (di *DecompressIterator) Err() error {
return di.err
}

// HasNext proceeds decompressing time-series data unitil EOF.
func (di *DecompressIterator) HasNext() bool {
// Next proceeds decompressing time-series data unitil EOF.
func (di *DecompressIterator) Next() bool {
if di.d.t == 0 {
di.t, di.v, di.err = di.d.decompressFirst()
} else {
Expand Down
4 changes: 2 additions & 2 deletions gorilla_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ func Test_Compress_Decompress(t *testing.T) {
require.Nil(t, err)
assert.Equal(t, header, h)
iter := d.Iterator()
for iter.HasNext() {
t, v := iter.Next()
for iter.Next() {
t, v := iter.At()
actual = append(actual, data{t, v})
}
require.Nil(t, iter.Err())
Expand Down

0 comments on commit cfc75fc

Please sign in to comment.