2019-06-25 11:42:17 +00:00
|
|
|
package cli
|
|
|
|
|
|
|
|
import (
|
2019-07-08 19:07:16 +00:00
|
|
|
"github.com/filecoin-project/go-lotus/api"
|
2019-06-25 11:42:17 +00:00
|
|
|
"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
|
2019-06-25 11:42:17 +00:00
|
|
|
var Commands = []*cli.Command{
|
2019-07-08 19:07:16 +00:00
|
|
|
netCmd,
|
2019-06-25 11:42:17 +00:00
|
|
|
versionCmd,
|
2019-06-28 09:03:28 +00:00
|
|
|
}
|