about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEmile <hanemile@protonmail.com>2019-09-23 13:29:45 +0200
committerEmile <hanemile@protonmail.com>2019-09-23 13:29:45 +0200
commit4443b942b080c7a27a87e3f9660835a4504fed77 (patch)
treef357779aa767f27a997b58c69afe6c2e28d58ca2
parenta0d950848d3699e72bc267639bfd6400bc38d7e1 (diff)
added more comments
-rw-r--r--server.go13
1 files changed, 12 insertions, 1 deletions
diff --git a/server.go b/server.go
index 586d962..49dfb2b 100644
--- a/server.go
+++ b/server.go
@@ -11,8 +11,19 @@ import (
 )
 
 var (
+	// Store a list of categories
 	categories []string
-	port       int
+
+	// 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)
+
+	// Define the port the server should listen on
+	port int
 )
 
 func main() {