package main import ( "net/http" "time" ) var SharedCache *Datastore var routeMap = map[string]http.HandlerFunc{ "/": listContent, "/about": about, "/manage": manageContent, "/ping": healthcheck, } var bgTasks = []BackgroundTask{ {refreshFeeds, 10 * time.Minute}, } func main() { SharedCache = &Datastore{ Data: map[string]string{}, } if existingStore := FromFile("datastore.json"); existingStore != nil { SharedCache = existingStore } NewApp(routeMap, bgTasks, "./static").Start(":9000") }