Evgenii Stratonikov
f1f56ef871
All checks were successful
ci/woodpecker/push/pre-commit Pipeline was successful
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
30 lines
927 B
Go
30 lines
927 B
Go
package accounting
|
|
|
|
import (
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-cli/internal/common"
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-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))
|
|
common.StartClientCommandSpan(cmd)
|
|
},
|
|
PersistentPostRun: common.StopClientCommandSpan,
|
|
}
|
|
|
|
func init() {
|
|
Cmd.AddCommand(accountingBalanceCmd)
|
|
|
|
initAccountingBalanceCmd()
|
|
}
|