From 08a45ee460bba9606fb20e73d9ba4fe2d6236768 Mon Sep 17 00:00:00 2001 From: Janos Guljas Date: Thu, 28 Feb 2019 08:18:14 +0100 Subject: [PATCH] swarm/shed: fix comments --- swarm/shed/index.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swarm/shed/index.go b/swarm/shed/index.go index 03f32e3c88..d02bf1a004 100644 --- a/swarm/shed/index.go +++ b/swarm/shed/index.go @@ -265,7 +265,7 @@ func (f Index) Iterate(fn IndexIterFunc, options *IterateOptions) (err error) { } // First returns the first item in the Index which encoded key starts with a prefix. -// If the prefix is nil, the Last element of the whole index is returned. +// If the prefix is nil, the first element of the whole index is returned. // If Index has no elements, a leveldb.ErrNotFound error is returned. func (f Index) First(prefix []byte) (i Item, err error) { it := f.db.NewIterator() @@ -300,7 +300,7 @@ func (f Index) itemFromIterator(it iterator.Iterator, totalPrefix []byte) (i Ite } // Last returns the last item in the Index which encoded key starts with a prefix. -// If the prefix is nil, the Last element of the whole index is returned. +// If the prefix is nil, the last element of the whole index is returned. // If Index has no elements, a leveldb.ErrNotFound error is returned. func (f Index) Last(prefix []byte) (i Item, err error) { it := f.db.NewIterator()