mirror of
https://github.com/miguelmota/cointop
synced 2024-11-05 00:00:14 +00:00
28 lines
441 B
Go
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()
|
|
}
|