lotus/cmd/lotus-shed/main.go
2020-05-07 05:20:17 +00:00

52 lines
854 B
Go

package main
import (
"os"
logging "github.com/ipfs/go-log/v2"
"gopkg.in/urfave/cli.v2"
"github.com/filecoin-project/lotus/build"
)
var log = logging.Logger("lotus-shed")
func main() {
logging.SetLogLevel("*", "INFO")
local := []*cli.Command{
base32Cmd,
base16Cmd,
bitFieldCmd,
keyinfoCmd,
peerkeyCmd,
noncefix,
bigIntParseCmd,
staterootStatsCmd,
importCarCmd,
commpToCidCmd,
fetchParamCmd,
}
app := &cli.App{
Name: "lotus-shed",
Usage: "A place for all the lotus tools",
Version: build.BuildVersion,
Commands: local,
Flags: []cli.Flag{
&cli.StringFlag{
Name: "repo",
EnvVars: []string{"LOTUS_PATH"},
Hidden: true,
Value: "~/.lotus", // TODO: Consider XDG_DATA_HOME
},
},
}
if err := app.Run(os.Args); err != nil {
log.Warnf("%+v", err)
os.Exit(1)
return
}
}