remove cancel and appCtx
This commit is contained in:
parent
795e555286
commit
9e292c1f5a
5
main.go
5
main.go
@ -28,8 +28,7 @@ var (
|
|||||||
schema string
|
schema string
|
||||||
|
|
||||||
//go:embed assets
|
//go:embed assets
|
||||||
assets embed.FS
|
assets embed.FS
|
||||||
appCtx, cancel = context.WithTimeout(context.Background(), 30*time.Second)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var app = &App{
|
var app = &App{
|
||||||
@ -38,7 +37,6 @@ var app = &App{
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
defer cancel()
|
|
||||||
name := flag.String("name", "startpage", "name of service")
|
name := flag.String("name", "startpage", "name of service")
|
||||||
key := flag.String("key", "", "path to file containing the api key")
|
key := flag.String("key", "", "path to file containing the api key")
|
||||||
watchInterval := flag.Int64("refresh", 5, "number of minutes between watch refresh")
|
watchInterval := flag.Int64("refresh", 5, "number of minutes between watch refresh")
|
||||||
@ -51,7 +49,6 @@ func main() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal("can't open database: ", err)
|
log.Fatal("can't open database: ", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
dbExists := false
|
dbExists := false
|
||||||
if *dbFile == ":memory:" {
|
if *dbFile == ":memory:" {
|
||||||
err := tmpDBPopulate(db)
|
err := tmpDBPopulate(db)
|
||||||
|
Loading…
Reference in New Issue
Block a user