Skip to content

Commit

Permalink
satellite/metainfo: improve Loop comments (#3595)
Browse files Browse the repository at this point in the history
  • Loading branch information
mniewrzal authored and ethanadams committed Nov 21, 2019
1 parent 2739771 commit d96df26
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions satellite/metainfo/loop.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
var (
// LoopError is a standard error class for this component.
LoopError = errs.Class("metainfo loop error")
// LoopClosedError is a loop closed error
// LoopClosedError is a loop closed error.
LoopClosedError = LoopError.New("loop closed")
)

Expand All @@ -32,7 +32,7 @@ type Observer interface {
InlineSegment(context.Context, ScopedPath, *pb.Pointer) error
}

// ScopedPath contains full expanded information about the path
// ScopedPath contains full expanded information about the path.
type ScopedPath struct {
ProjectID uuid.UUID
ProjectIDString string
Expand Down Expand Up @@ -169,7 +169,7 @@ waitformore:
return iterateDatabase(ctx, loop.db, observers)
}

// IterateDatabase iterate over PointerDB and notify specified observers about results
// IterateDatabase iterates over PointerDB and notifies specified observers about results.
func IterateDatabase(ctx context.Context, db PointerDB, observers ...Observer) error {
obsContexts := make([]*observerContext, len(observers))
for i, observer := range observers {
Expand All @@ -183,7 +183,7 @@ func IterateDatabase(ctx context.Context, db PointerDB, observers ...Observer) e
}

// handlePointer deals with a pointer for a single observer
// if there is some error on the observer, handle the error and return false. Otherwise, return true
// if there is some error on the observer, handles the error and returns false. Otherwise, returns true.
func handlePointer(ctx context.Context, observer *observerContext, path ScopedPath, isLastSegment bool, pointer *pb.Pointer) bool {
switch pointer.GetType() {
case pb.Pointer_REMOTE:
Expand Down

0 comments on commit d96df26

Please sign in to comment.