diff options
Diffstat (limited to 'server.go')
-rw-r--r-- | server.go | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/server.go b/server.go index 49dfb2b..76085d1 100644 --- a/server.go +++ b/server.go @@ -14,13 +14,9 @@ var ( // Store a list of categories categories []string - // Map a category to it's age on disk - // If a category is downloaded, it is added to this map with it's Unix epoch - // timestamp. - // If the category is too old, re-download it - // TODO: Define what "to old" acutually means and what default value it - // might get - categoryAge = make(map[string]int) + // Threshold defining how old a category must be before it is considered "to + // old" (in seconds) + categoryAgeThreshold int // Define the port the server should listen on port int @@ -44,5 +40,6 @@ func main() { func initFlags() { flag.IntVar(&port, "p", 8080, "the port the server should listen on") + flag.IntVar(&categoryAgeThreshold, "a", 10, "max category age in seconds") flag.Parse() } |