amo/cmd/amocli/main.go

32 lines
480 B
Go

package main
import "surdeus.su/core/cli/mtool"
import "runtime/debug"
import "os"
import "log"
import "fmt"
func main() {
tool.Run(os.Args[1:])
}
var tool = mtool.T("amocli").Subs(
getLead,
getComs,
updateComs,
getContacts,
getLeadTuple,
mtool.T("version").Func(func(flags *mtool.Flags){
bi, ok := debug.ReadBuildInfo()
if !ok {
log.Fatalf("could not read build info\n")
return
}
fmt.Println(bi.Main.Version)
}).Desc(
"print program version",
),
)