lotus/cli/cmd.go

19 lines
322 B
Go
Raw Normal View History

package cli
import (
2019-07-08 19:07:16 +00:00
"github.com/filecoin-project/go-lotus/api"
"gopkg.in/urfave/cli.v2"
)
2019-07-08 19:07:16 +00:00
type ApiConnector func() api.API
func getApi(ctx *cli.Context) api.API {
return ctx.App.Metadata["api"].(ApiConnector)()
}
2019-07-02 13:05:43 +00:00
// Commands is the root group of CLI commands
var Commands = []*cli.Command{
2019-07-08 19:07:16 +00:00
netCmd,
versionCmd,
}