Fix flags support
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
parent
de9d98c040
commit
272f4388c0
5
main.go
5
main.go
@ -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()
|
||||||
|
Loading…
Reference in New Issue
Block a user