From 9e292c1f5a3bea1726a92dbc0cbe88ac9da4b14a Mon Sep 17 00:00:00 2001 From: Aaron Bieber Date: Mon, 8 Jul 2024 18:29:57 -0600 Subject: [PATCH] remove cancel and appCtx --- main.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/main.go b/main.go index 1300c4c..5b63db7 100644 --- a/main.go +++ b/main.go @@ -28,8 +28,7 @@ var ( schema string //go:embed assets - assets embed.FS - appCtx, cancel = context.WithTimeout(context.Background(), 30*time.Second) + assets embed.FS ) var app = &App{ @@ -38,7 +37,6 @@ var app = &App{ } func main() { - defer cancel() name := flag.String("name", "startpage", "name of service") key := flag.String("key", "", "path to file containing the api key") watchInterval := flag.Int64("refresh", 5, "number of minutes between watch refresh") @@ -51,7 +49,6 @@ func main() { if err != nil { log.Fatal("can't open database: ", err) } - dbExists := false if *dbFile == ":memory:" { err := tmpDBPopulate(db)