2
0
mirror of https://github.com/miguelmota/cointop synced 2024-11-05 00:00:14 +00:00
cointop/main.go
2018-04-28 13:10:17 -07:00

38 lines
459 B
Go

package main
import (
"flag"
"fmt"
"time"
"github.com/miguelmota/cointop/cointop"
)
var version = "1.0.1"
func main() {
var ver bool
flag.BoolVar(&ver, "v", false, "Version")
var test bool
flag.BoolVar(&test, "test", false, "Run test")
flag.Parse()
if ver {
fmt.Println(version)
return
}
if test {
runTest()
return
}
cointop.Run()
}
func runTest() {
go func() {
cointop.Run()
}()
time.Sleep(1 * time.Second)
cointop.Exit()
}