1
0
mirror of https://github.com/mainflux/mainflux.git synced 2025-04-27 13:48:49 +08:00
Mainflux.mainflux/cli/version.go
Manuel Imperiale 53036b5ae7 Fix CLI docs (#566)
* Fix CLI docs

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix CLI docs typo

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix CLI docs typo

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix CLI docs typo

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Typo fix

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix typo

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Typo fix

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2019-02-01 23:17:09 +01:00

29 lines
523 B
Go

//
// Copyright (c) 2018
// Mainflux
//
// SPDX-License-Identifier: Apache-2.0
//
package cli
import "github.com/spf13/cobra"
// NewVersionCmd returns version command.
func NewVersionCmd() *cobra.Command {
return &cobra.Command{
Use: "version",
Short: "Mainflux services version",
Long: `Mainflux services version: get version of Mainflux Things Service`,
Run: func(cmd *cobra.Command, args []string) {
v, err := sdk.Version()
if err != nil {
logError(err)
return
}
logJSON(v)
},
}
}