Monorepo for Tangled tangled.org

*.go: fix vet checks

Signed-off-by: Winter <winter@winter.cafe>

Changed files
+18 -18
appview
pages
reporesolver
spindles
state
+15 -15
appview/pages/funcmap.go
··· 124 124 "relTimeFmt": humanize.Time, 125 125 "shortRelTimeFmt": func(t time.Time) string { 126 126 return humanize.CustomRelTime(t, time.Now(), "", "", []humanize.RelTimeMagnitude{ 127 - {time.Second, "now", time.Second}, 128 - {2 * time.Second, "1s %s", 1}, 129 - {time.Minute, "%ds %s", time.Second}, 130 - {2 * time.Minute, "1min %s", 1}, 131 - {time.Hour, "%dmin %s", time.Minute}, 132 - {2 * time.Hour, "1hr %s", 1}, 133 - {humanize.Day, "%dhrs %s", time.Hour}, 134 - {2 * humanize.Day, "1d %s", 1}, 135 - {20 * humanize.Day, "%dd %s", humanize.Day}, 136 - {8 * humanize.Week, "%dw %s", humanize.Week}, 137 - {humanize.Year, "%dmo %s", humanize.Month}, 138 - {18 * humanize.Month, "1y %s", 1}, 139 - {2 * humanize.Year, "2y %s", 1}, 140 - {humanize.LongTime, "%dy %s", humanize.Year}, 141 - {math.MaxInt64, "a long while %s", 1}, 127 + {D: time.Second, Format: "now", DivBy: time.Second}, 128 + {D: 2 * time.Second, Format: "1s %s", DivBy: 1}, 129 + {D: time.Minute, Format: "%ds %s", DivBy: time.Second}, 130 + {D: 2 * time.Minute, Format: "1min %s", DivBy: 1}, 131 + {D: time.Hour, Format: "%dmin %s", DivBy: time.Minute}, 132 + {D: 2 * time.Hour, Format: "1hr %s", DivBy: 1}, 133 + {D: humanize.Day, Format: "%dhrs %s", DivBy: time.Hour}, 134 + {D: 2 * humanize.Day, Format: "1d %s", DivBy: 1}, 135 + {D: 20 * humanize.Day, Format: "%dd %s", DivBy: humanize.Day}, 136 + {D: 8 * humanize.Week, Format: "%dw %s", DivBy: humanize.Week}, 137 + {D: humanize.Year, Format: "%dmo %s", DivBy: humanize.Month}, 138 + {D: 18 * humanize.Month, Format: "1y %s", DivBy: 1}, 139 + {D: 2 * humanize.Year, Format: "2y %s", DivBy: 1}, 140 + {D: humanize.LongTime, Format: "%dy %s", DivBy: humanize.Year}, 141 + {D: math.MaxInt64, Format: "a long while %s", DivBy: 1}, 142 142 }) 143 143 }, 144 144 "longTimeFmt": func(t time.Time) string {
+1 -1
appview/reporesolver/resolver.go
··· 274 274 func (f *ResolvedRepo) RolesInRepo(u *oauth.User) repoinfo.RolesInRepo { 275 275 if u != nil { 276 276 r := f.rr.enforcer.GetPermissionsInRepo(u.Did, f.Knot, f.DidSlashRepo()) 277 - return repoinfo.RolesInRepo{r} 277 + return repoinfo.RolesInRepo{Roles: r} 278 278 } else { 279 279 return repoinfo.RolesInRepo{} 280 280 }
+1 -1
appview/spindles/spindles.go
··· 442 442 } 443 443 444 444 w.Header().Set("HX-Reswap", "outerHTML") 445 - s.Pages.SpindleListing(w, pages.SpindleListingParams{verifiedSpindle[0]}) 445 + s.Pages.SpindleListing(w, pages.SpindleListingParams{Spindle: verifiedSpindle[0]}) 446 446 } 447 447 448 448 func (s *Spindles) addMember(w http.ResponseWriter, r *http.Request) {
+1 -1
appview/state/state.go
··· 81 81 82 82 repoResolver := reporesolver.New(config, enforcer, res, d) 83 83 84 - wrapper := db.DbWrapper{d} 84 + wrapper := db.DbWrapper{Execer: d} 85 85 jc, err := jetstream.NewJetstreamClient( 86 86 config.Jetstream.Endpoint, 87 87 "appview",