build: Enable gometalinter "gosimple" check, improve build.go

This commit is contained in:
Jakob Borg
2016-12-18 19:57:41 +01:00
committed by Jakob Borg
parent 47f22ff3e5
commit d41c131364
19 changed files with 108 additions and 130 deletions

View File

@@ -73,11 +73,14 @@ func NewStaggered(folderID, folderPath string, params map[string]string) Version
l.Debugf("instantiated %#v", s)
go func() {
// TODO: This should be converted to a Serve() method.
s.clean()
if testCleanDone != nil {
close(testCleanDone)
}
for range time.Tick(time.Duration(cleanInterval) * time.Second) {
tck := time.NewTicker(time.Duration(cleanInterval) * time.Second)
defer tck.Stop()
for range tck.C {
s.clean()
}
}()