2018-03-31 08:59:20 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2018-04-28 00:07:13 +00:00
|
|
|
"flag"
|
|
|
|
"fmt"
|
|
|
|
|
2018-03-31 08:59:20 +00:00
|
|
|
"github.com/miguelmota/cointop/cointop"
|
|
|
|
)
|
|
|
|
|
2018-04-28 20:10:17 +00:00
|
|
|
var version = "1.0.1"
|
2018-04-28 00:07:13 +00:00
|
|
|
|
2018-03-31 08:59:20 +00:00
|
|
|
func main() {
|
2018-05-13 01:47:06 +00:00
|
|
|
var ver, test bool
|
2018-04-28 00:07:13 +00:00
|
|
|
flag.BoolVar(&ver, "v", false, "Version")
|
|
|
|
flag.BoolVar(&test, "test", false, "Run test")
|
|
|
|
flag.Parse()
|
|
|
|
if ver {
|
|
|
|
fmt.Println(version)
|
2018-05-13 01:47:06 +00:00
|
|
|
} else if test {
|
|
|
|
doTest()
|
|
|
|
} else {
|
|
|
|
cointop.New().Run()
|
2018-04-28 00:07:13 +00:00
|
|
|
}
|
2018-03-31 08:59:20 +00:00
|
|
|
}
|
2018-04-28 00:07:13 +00:00
|
|
|
|
2018-05-13 01:47:06 +00:00
|
|
|
func doTest() {
|
|
|
|
cointop.New().Exit()
|
2018-04-28 00:07:13 +00:00
|
|
|
}
|