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
|
||||
)
|
||||
|
||||
func main() {
|
||||
func init() {
|
||||
flag.IntVar(&interval, "interval", 30, "Duration, in minutes, between speedtest runs")
|
||||
flag.IntVar(&port, "port", 9091, "The port to listen on")
|
||||
flag.Parse()
|
||||
}
|
||||
|
||||
func main() {
|
||||
go (func() {
|
||||
for {
|
||||
checkSpeed()
|
||||
|
Loading…
x
Reference in New Issue
Block a user