forked from TrueCloudLab/frostfs-node
[#1379] neofs-cli: Move accounting command to a separate package
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
56f33436dd
commit
c6325fdc91
3 changed files with 44 additions and 42 deletions
27
cmd/neofs-cli/modules/accounting/root.go
Normal file
27
cmd/neofs-cli/modules/accounting/root.go
Normal file
|
@ -0,0 +1,27 @@
|
|||
package accounting
|
||||
|
||||
import (
|
||||
"github.com/nspcc-dev/neofs-node/cmd/neofs-cli/internal/commonflags"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
// Cmd represents the accounting command
|
||||
var Cmd = &cobra.Command{
|
||||
Use: "accounting",
|
||||
Short: "Operations with accounts and balances",
|
||||
Long: `Operations with accounts and balances`,
|
||||
PersistentPreRun: func(cmd *cobra.Command, args []string) {
|
||||
flags := cmd.Flags()
|
||||
|
||||
_ = viper.BindPFlag(commonflags.WalletPath, flags.Lookup(commonflags.WalletPath))
|
||||
_ = viper.BindPFlag(commonflags.Account, flags.Lookup(commonflags.Account))
|
||||
_ = viper.BindPFlag(commonflags.RPC, flags.Lookup(commonflags.RPC))
|
||||
},
|
||||
}
|
||||
|
||||
func init() {
|
||||
Cmd.AddCommand(accountingBalanceCmd)
|
||||
|
||||
initAccountingBalanceCmd()
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue