Skip to content

Commit

Permalink
renames errFoo -> errClosing
Browse files Browse the repository at this point in the history
  • Loading branch information
petethepig committed Jan 31, 2021
1 parent 9fa9e34 commit aaf0a68
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/storage/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/sirupsen/logrus"
)

var errFoo = errors.New("the db is in closing state")
var errClosing = errors.New("the db is in closing state")

type Storage struct {
closingMutex sync.Mutex
Expand Down Expand Up @@ -171,7 +171,7 @@ func (s *Storage) Put(startTime, endTime time.Time, key *Key, val *tree.Tree, sp
defer s.closingMutex.Unlock()

if s.closing {
return errFoo
return errClosing
}
logrus.WithFields(logrus.Fields{
"startTime": startTime.String(),
Expand Down Expand Up @@ -218,7 +218,7 @@ func (s *Storage) Get(startTime, endTime time.Time, key *Key) (*tree.Tree, *segm
defer s.closingMutex.Unlock()

if s.closing {
return nil, nil, "", 100, errFoo
return nil, nil, "", 100, errClosing
}

logrus.WithFields(logrus.Fields{
Expand Down

0 comments on commit aaf0a68

Please sign in to comment.