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:
commit
c5c819afca
22
cmd/lotus-storage-miner/config.go
Normal file
22
cmd/lotus-storage-miner/config.go
Normal 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
|
||||
},
|
||||
}
|
@ -32,6 +32,7 @@ func main() {
|
||||
initCmd,
|
||||
runCmd,
|
||||
stopCmd,
|
||||
configCmd,
|
||||
lcli.WithCategory("chain", actorCmd),
|
||||
lcli.WithCategory("chain", infoCmd),
|
||||
lcli.WithCategory("market", storageDealsCmd),
|
||||
|
Loading…
Reference in New Issue
Block a user