Fix flags support

Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
Marcus Noble 2024-06-01 14:17:23 +01:00
parent de9d98c040
commit 272f4388c0
Signed by: AverageMarcus
GPG Key ID: B8F2DB8A7AEBAF78

View File

@ -21,10 +21,13 @@ var (
port int port int
) )
func main() { func init() {
flag.IntVar(&interval, "interval", 30, "Duration, in minutes, between speedtest runs") flag.IntVar(&interval, "interval", 30, "Duration, in minutes, between speedtest runs")
flag.IntVar(&port, "port", 9091, "The port to listen on") flag.IntVar(&port, "port", 9091, "The port to listen on")
flag.Parse()
}
func main() {
go (func() { go (func() {
for { for {
checkSpeed() checkSpeed()