File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
cmd/generate-project-list Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -10,13 +10,15 @@ import (
1010 "sort"
1111 "strings"
1212 "text/template"
13+ "time"
1314
1415 "github.com/google/go-github/v46/github"
1516 "github.com/jekyll/dashboard"
1617)
1718
1819var tmpl = template .Must (template .New (`configuration.go` ).Parse (`//go:generate go run ./cmd/generate-project-list
1920// THIS FILE IS AUTO-GENERATED WITH 'go generate .'
21+ // LAST UPDATED {{.Now.Format "Jan 02, 2006 15:04:05 UTC" }}
2022package dashboard
2123
2224var defaultProjects = []*Project{{"{"}}{{range .Repositories}}
@@ -32,6 +34,7 @@ var defaultProjects = []*Project{{"{"}}{{range .Repositories}}
3234
3335type templateData struct {
3436 Repositories []* dashboard.Project
37+ Now time.Time
3538}
3639
3740var additionalProjectNames = map [string ]bool {
@@ -96,7 +99,7 @@ func main() {
9699 })
97100
98101 s := & strings.Builder {}
99- err = tmpl .Execute (s , templateData {Repositories : repoInfos })
102+ err = tmpl .Execute (s , templateData {Repositories : repoInfos , Now : time . Now (). UTC () })
100103 if err != nil {
101104 log .Fatalf ("unable to execute template: %v" , err )
102105 }
Original file line number Diff line number Diff line change 11//go:generate go run ./cmd/generate-project-list
22// THIS FILE IS AUTO-GENERATED WITH 'go generate .'
3+ // LAST UPDATED Aug 22, 2022 01:17:04 UTC
34package dashboard
45
56var defaultProjects = []* Project {
You can’t perform that action at this time.
0 commit comments