Skip to content

Commit

Permalink
feat: show warning for old technologies.json file
Browse files Browse the repository at this point in the history
  • Loading branch information
rverton committed Oct 6, 2022
1 parent 1e9ba6e commit 79c64b4
Show file tree
Hide file tree
Showing 2 changed files with 12,565 additions and 717 deletions.
10 changes: 10 additions & 0 deletions cmd/webanalyze/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"os"
"strings"
"sync"
"time"

"github.com/rverton/webanalyze"
)
Expand Down Expand Up @@ -110,6 +111,15 @@ func main() {
printHeader()
}

appsInfo, err := os.Stat(apps)
if err != nil {
log.Fatalf("error: cant open %v: %v", apps, err)
}

if appsInfo.ModTime().Before(time.Now().Add(24 * time.Hour * 7 * -1)) {
log.Printf("warning: %v is older than a week", apps)
}

for i := 0; i < workers; i++ {
wg.Add(1)
go func() {
Expand Down

0 comments on commit 79c64b4

Please sign in to comment.