lotus/cmd/lotus-sim/delete.go

23 lines
373 B
Go
Raw Permalink Normal View History

2021-05-19 00:01:30 +00:00
package main
import (
"github.com/urfave/cli/v2"
)
var deleteSimCommand = &cli.Command{
Name: "delete",
2021-06-18 18:17:35 +00:00
Action: func(cctx *cli.Context) (err error) {
2021-05-19 00:01:30 +00:00
node, err := open(cctx)
if err != nil {
return err
}
2021-06-18 18:17:35 +00:00
defer func() {
if cerr := node.Close(); err == nil {
err = cerr
}
}()
2021-05-19 00:01:30 +00:00
return node.DeleteSim(cctx.Context, cctx.String("simulation"))
},
}