summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authornytpu <alex@nytpu.com>2021-03-23 08:12:53 -0600
committernytpu <alex@nytpu.com>2021-03-23 08:15:36 -0600
commit2cd16124f8cd1f3ff527b37cb7d18a7b818841af (patch)
tree6a262f2455899b2b96a246f77737bbbb2d4318c6 /core
parent9549e569f98ae703f7d8865a3315ceb74f13bf7f (diff)
add timeout flag to refresh
Diffstat (limited to 'core')
-rw-r--r--core/core.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/core.go b/core/core.go
index f3d88ff..b7d1858 100644
--- a/core/core.go
+++ b/core/core.go
@@ -28,10 +28,13 @@ var Data = FullData{
// Maps are created in init()
}
-// the header of feeds.gmi.
+// the Header of feeds.gmi.
// set in Init, either to the contents of header.gmi or to the default string
var Header string
+// Timeout for requests
+var Timeout int
+
// have to do this instead of the automatically called init() because
// initialization stuff requires parsing of command line args first
func Init(dataPath string) error {
@@ -88,6 +91,8 @@ func Init(dataPath string) error {
`
}
+ Timeout = 10
+
return nil
}