frostfs-node/cmd/frostfs-adm/internal/modules/morph/contract/root.go
Anton Nikiforov e2557b2f0b [#932] adm: Move dump-hashes to package contract
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
2024-02-13 09:59:27 +03:00

25 lines
699 B
Go

package contract
import (
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/util"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
var DumpHashesCmd = &cobra.Command{
Use: "dump-hashes",
Short: "Dump deployed contract hashes",
PreRun: func(cmd *cobra.Command, _ []string) {
_ = viper.BindPFlag(util.EndpointFlag, cmd.Flags().Lookup(util.EndpointFlag))
},
RunE: dumpContractHashes,
}
func initDumpContractHashesCmd() {
DumpHashesCmd.Flags().StringP(util.EndpointFlag, util.EndpointFlagShort, "", util.EndpointFlagDesc)
DumpHashesCmd.Flags().String(util.CustomZoneFlag, "", "Custom zone to search.")
}
func init() {
initDumpContractHashesCmd()
}