2
0
mirror of https://github.com/miguelmota/cointop synced 2024-11-14 18:12:57 +00:00
cointop/main.go

29 lines
385 B
Go
Raw Normal View History

package main
import (
2018-04-28 00:07:13 +00:00
"flag"
"fmt"
"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
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-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
}