add timeout flag to refresh

This commit is contained in:
nytpu
2021-03-23 08:12:53 -06:00
parent 9549e569f9
commit 2cd16124f8
4 changed files with 20 additions and 3 deletions
+6 -1
View File
@@ -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
}