2
0
mirror of https://github.com/miguelmota/cointop synced 2024-11-10 13:10:26 +00:00
cointop/main.go
2018-06-23 12:24:49 -07:00

28 lines
441 B
Go

package main
import (
"flag"
"fmt"
"github.com/miguelmota/cointop/cointop"
)
func main() {
var v, ver, test bool
flag.BoolVar(&v, "v", false, "Version")
flag.BoolVar(&ver, "version", false, "Version")
flag.BoolVar(&test, "test", false, "Run test")
flag.Parse()
if v || ver {
fmt.Printf("cointop v%s", cointop.Version())
} else if test {
doTest()
} else {
cointop.New().Run()
}
}
func doTest() {
cointop.New().Exit()
}