mirror of
https://github.com/gojp/goreportcard.git
synced 2026-01-28 22:39:05 +08:00
remove dir after running checks
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -109,6 +110,13 @@ func newChecksResp(db *badger.DB, repo string, forceRefresh bool) (checksResp, e
|
||||
return checksResp{}, err
|
||||
}
|
||||
|
||||
defer func() {
|
||||
err := os.RemoveAll(dirName(repo))
|
||||
if err != nil {
|
||||
log.Println("ERROR: could not remove dir:", err)
|
||||
}
|
||||
}()
|
||||
|
||||
t := time.Now().UTC()
|
||||
resp := checksResp{
|
||||
Checks: checkResult.Checks,
|
||||
|
||||
Reference in New Issue
Block a user