Enable gosimple and ineffasign linters

This commit is contained in:
Andrey Smirnov
2017-04-27 18:34:30 +03:00
parent 7a7b981d4f
commit bae3f949b4
16 changed files with 32 additions and 49 deletions
+1 -1
View File
@@ -273,7 +273,7 @@ func (context *AptlyContext) ReOpenDatabase() error {
for try := 0; try < MaxTries; try++ {
err := context.database.ReOpen()
if err == nil || strings.Index(err.Error(), "resource temporarily unavailable") == -1 {
if err == nil || !strings.Contains(err.Error(), "resource temporarily unavailable") {
return err
}
context._progress().Printf("Unable to reopen database, sleeping %s\n", Delay)