From fbd6ea7fb214c13a249ec4bac1a983598151c150 Mon Sep 17 00:00:00 2001 From: Elara6331 Date: Fri, 19 Jan 2024 20:26:04 -0800 Subject: [PATCH] Pull repos on startup --- main.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.go b/main.go index ba3fe61..f188d46 100644 --- a/main.go +++ b/main.go @@ -10,6 +10,7 @@ import ( "go.elara.ws/logger" "go.elara.ws/logger/log" "lure.sh/lure/pkg/loggerctx" + "lure.sh/lure/pkg/repos" ) //go:embed static @@ -27,6 +28,11 @@ func main() { ctx := loggerctx.With(context.Background(), log.Logger) + err := repos.Pull(ctx, nil) + if err != nil { + log.Fatal("Error pulling repos").Err(err).Send() + } + registerBadge(mux) registerSite(mux) registerAPI(mux)