lotus/cli/version.go

26 lines
380 B
Go
Raw Normal View History

package cli
import (
2019-07-12 15:29:41 +00:00
"fmt"
"gopkg.in/urfave/cli.v2"
)
var versionCmd = &cli.Command{
Name: "version",
Usage: "Print version",
2019-07-12 15:29:41 +00:00
Action: func(cctx *cli.Context) error {
api, err := getAPI(cctx)
if err != nil {
return err
}
ctx := reqContext(cctx)
// TODO: print more useful things
2019-07-12 15:29:41 +00:00
fmt.Println(api.Version(ctx))
cli.VersionPrinter(cctx)
return nil
},
}