Merge pull request #3098 from filecoin-project/feat/config-cmd

Add config command that prints the default config file for a storage …
This commit is contained in:
Łukasz Magiera 2020-08-17 08:36:51 +02:00 committed by GitHub
commit c5c819afca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,22 @@
package main
import (
"fmt"
"github.com/urfave/cli/v2"
"github.com/filecoin-project/lotus/node/config"
)
var configCmd = &cli.Command{
Name: "config",
Usage: "Output default configuration",
Action: func(cctx *cli.Context) error {
comm, err := config.ConfigComment(config.DefaultStorageMiner())
if err != nil {
return err
}
fmt.Println(string(comm))
return nil
},
}

View File

@ -32,6 +32,7 @@ func main() {
initCmd,
runCmd,
stopCmd,
configCmd,
lcli.WithCategory("chain", actorCmd),
lcli.WithCategory("chain", infoCmd),
lcli.WithCategory("market", storageDealsCmd),