mirror of
https://github.com/shirou/mqttcli.git
synced 2025-05-02 22:17:09 +08:00
add versioning.
This commit is contained in:
parent
e138636529
commit
741608640d
3
main.go
3
main.go
@ -14,6 +14,8 @@ var usage = `
|
|||||||
Usage here
|
Usage here
|
||||||
`
|
`
|
||||||
|
|
||||||
|
const version = "0.0.1"
|
||||||
|
|
||||||
func initFunc() {
|
func initFunc() {
|
||||||
log.SetLevel(log.WarnLevel)
|
log.SetLevel(log.WarnLevel)
|
||||||
log.SetOutput(colorable.NewColorableStdout())
|
log.SetOutput(colorable.NewColorableStdout())
|
||||||
@ -96,6 +98,7 @@ func main() {
|
|||||||
app := cli.NewApp()
|
app := cli.NewApp()
|
||||||
app.Name = "mqttcli"
|
app.Name = "mqttcli"
|
||||||
app.Usage = usage
|
app.Usage = usage
|
||||||
|
app.Version = version
|
||||||
|
|
||||||
commonFlags := []cli.Flag{
|
commonFlags := []cli.Flag{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user