Refactor parts of the code and add more tests
This is a refactor of parts of the code, some minor things such as adding punctuation in the end of sentences and making the code a bit easier to read. More tests has been added in the form of gometalinter which checks the code health, style and spelling errors. The flaky cleanup test should also be fixed with this commit.
This commit is contained in:
@@ -38,11 +38,11 @@ func (db *PGStore) cleanup(interval time.Duration, quit <-chan struct{}, done ch
|
||||
for {
|
||||
select {
|
||||
case <-quit:
|
||||
// Handle the quit signal
|
||||
// Handle the quit signal.
|
||||
done <- struct{}{}
|
||||
return
|
||||
case <-ticker.C:
|
||||
// Delete expired sessions on each tick
|
||||
// Delete expired sessions on each tick.
|
||||
err := db.deleteExpired()
|
||||
if err != nil {
|
||||
log.Printf("pgstore: unable to delete expired sessions: %v", err)
|
||||
|
Reference in New Issue
Block a user