[#1555] neofs-adm: Remove trailing dots from help messages

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-06-28 09:03:52 +03:00 committed by fyrchik
parent b41658db04
commit ad81b6c90a
4 changed files with 24 additions and 24 deletions

View file

@ -10,12 +10,12 @@ var (
// RootCmd is a root command of config section. // RootCmd is a root command of config section.
RootCmd = &cobra.Command{ RootCmd = &cobra.Command{
Use: "config", Use: "config",
Short: "Section for neofs-adm config related commands.", Short: "Section for neofs-adm config related commands",
} }
initCmd = &cobra.Command{ initCmd = &cobra.Command{
Use: "init", Use: "init",
Short: "Initialize basic neofs-adm configuration file.", Short: "Initialize basic neofs-adm configuration file",
Example: `neofs-adm config init Example: `neofs-adm config init
neofs-adm config init --path .config/neofs-adm.yml`, neofs-adm config init --path .config/neofs-adm.yml`,
RunE: initConfig, RunE: initConfig,

View file

@ -44,7 +44,7 @@ var (
// RootCmd is a root command of config section. // RootCmd is a root command of config section.
RootCmd = &cobra.Command{ RootCmd = &cobra.Command{
Use: "morph", Use: "morph",
Short: "Section for morph network configuration commands.", Short: "Section for morph network configuration commands",
} }
generateAlphabetCmd = &cobra.Command{ generateAlphabetCmd = &cobra.Command{
@ -135,7 +135,7 @@ var (
dumpContractHashesCmd = &cobra.Command{ dumpContractHashesCmd = &cobra.Command{
Use: "dump-hashes", Use: "dump-hashes",
Short: "Dump deployed contract hashes.", Short: "Dump deployed contract hashes",
PreRun: func(cmd *cobra.Command, _ []string) { PreRun: func(cmd *cobra.Command, _ []string) {
_ = viper.BindPFlag(endpointFlag, cmd.Flags().Lookup(endpointFlag)) _ = viper.BindPFlag(endpointFlag, cmd.Flags().Lookup(endpointFlag))
}, },
@ -144,7 +144,7 @@ var (
dumpNetworkConfigCmd = &cobra.Command{ dumpNetworkConfigCmd = &cobra.Command{
Use: "dump-config", Use: "dump-config",
Short: "Dump NeoFS network config.", Short: "Dump NeoFS network config",
PreRun: func(cmd *cobra.Command, _ []string) { PreRun: func(cmd *cobra.Command, _ []string) {
_ = viper.BindPFlag(endpointFlag, cmd.Flags().Lookup(endpointFlag)) _ = viper.BindPFlag(endpointFlag, cmd.Flags().Lookup(endpointFlag))
}, },
@ -162,7 +162,7 @@ var (
updateContractsCmd = &cobra.Command{ updateContractsCmd = &cobra.Command{
Use: "update-contracts", Use: "update-contracts",
Short: "Update NeoFS contracts.", Short: "Update NeoFS contracts",
PreRun: func(cmd *cobra.Command, _ []string) { PreRun: func(cmd *cobra.Command, _ []string) {
_ = viper.BindPFlag(alphabetWalletsFlag, cmd.Flags().Lookup(alphabetWalletsFlag)) _ = viper.BindPFlag(alphabetWalletsFlag, cmd.Flags().Lookup(alphabetWalletsFlag))
_ = viper.BindPFlag(endpointFlag, cmd.Flags().Lookup(endpointFlag)) _ = viper.BindPFlag(endpointFlag, cmd.Flags().Lookup(endpointFlag))
@ -172,7 +172,7 @@ var (
dumpContainersCmd = &cobra.Command{ dumpContainersCmd = &cobra.Command{
Use: "dump-containers", Use: "dump-containers",
Short: "Dump NeoFS containers to file.", Short: "Dump NeoFS containers to file",
PreRun: func(cmd *cobra.Command, _ []string) { PreRun: func(cmd *cobra.Command, _ []string) {
_ = viper.BindPFlag(endpointFlag, cmd.Flags().Lookup(endpointFlag)) _ = viper.BindPFlag(endpointFlag, cmd.Flags().Lookup(endpointFlag))
}, },
@ -181,7 +181,7 @@ var (
restoreContainersCmd = &cobra.Command{ restoreContainersCmd = &cobra.Command{
Use: "restore-containers", Use: "restore-containers",
Short: "Restore NeoFS containers from file.", Short: "Restore NeoFS containers from file",
PreRun: func(cmd *cobra.Command, _ []string) { PreRun: func(cmd *cobra.Command, _ []string) {
_ = viper.BindPFlag(alphabetWalletsFlag, cmd.Flags().Lookup(alphabetWalletsFlag)) _ = viper.BindPFlag(alphabetWalletsFlag, cmd.Flags().Lookup(alphabetWalletsFlag))
_ = viper.BindPFlag(endpointFlag, cmd.Flags().Lookup(endpointFlag)) _ = viper.BindPFlag(endpointFlag, cmd.Flags().Lookup(endpointFlag))
@ -191,7 +191,7 @@ var (
depositNotaryCmd = &cobra.Command{ depositNotaryCmd = &cobra.Command{
Use: "deposit-notary", Use: "deposit-notary",
Short: "Deposit GAS for notary service.", Short: "Deposit GAS for notary service",
PreRun: func(cmd *cobra.Command, _ []string) { PreRun: func(cmd *cobra.Command, _ []string) {
_ = viper.BindPFlag(endpointFlag, cmd.Flags().Lookup(endpointFlag)) _ = viper.BindPFlag(endpointFlag, cmd.Flags().Lookup(endpointFlag))
}, },

View file

@ -38,7 +38,7 @@ func viperBindFlags(cmd *cobra.Command, flags ...string) {
// subnet command section. // subnet command section.
var cmdSubnet = &cobra.Command{ var cmdSubnet = &cobra.Command{
Use: "subnet", Use: "subnet",
Short: "NeoFS subnet management.", Short: "NeoFS subnet management",
PreRun: func(cmd *cobra.Command, _ []string) { PreRun: func(cmd *cobra.Command, _ []string) {
viperBindFlags(cmd, viperBindFlags(cmd,
endpointFlag, endpointFlag,
@ -115,7 +115,7 @@ func readSubnetKey(key *keys.PrivateKey) error {
// create subnet command. // create subnet command.
var cmdSubnetCreate = &cobra.Command{ var cmdSubnetCreate = &cobra.Command{
Use: "create", Use: "create",
Short: "Create NeoFS subnet.", Short: "Create NeoFS subnet",
PreRun: func(cmd *cobra.Command, _ []string) { PreRun: func(cmd *cobra.Command, _ []string) {
viperBindFlags(cmd, viperBindFlags(cmd,
flagSubnetWallet, flagSubnetWallet,
@ -180,7 +180,7 @@ var errZeroSubnet = errors.New("zero subnet")
// remove subnet command. // remove subnet command.
var cmdSubnetRemove = &cobra.Command{ var cmdSubnetRemove = &cobra.Command{
Use: "remove", Use: "remove",
Short: "Remove NeoFS subnet.", Short: "Remove NeoFS subnet",
PreRun: func(cmd *cobra.Command, _ []string) { PreRun: func(cmd *cobra.Command, _ []string) {
viperBindFlags(cmd, viperBindFlags(cmd,
flagSubnetWallet, flagSubnetWallet,
@ -214,7 +214,7 @@ var cmdSubnetRemove = &cobra.Command{
return fmt.Errorf("morph invocation: %w", err) return fmt.Errorf("morph invocation: %w", err)
} }
cmd.Println("Remove subnet request sent successfully.") cmd.Println("Remove subnet request sent successfully")
return nil return nil
}, },
@ -229,7 +229,7 @@ const (
// get subnet command. // get subnet command.
var cmdSubnetGet = &cobra.Command{ var cmdSubnetGet = &cobra.Command{
Use: "get", Use: "get",
Short: "Read information about the NeoFS subnet.", Short: "Read information about the NeoFS subnet",
PreRun: func(cmd *cobra.Command, _ []string) { PreRun: func(cmd *cobra.Command, _ []string) {
viperBindFlags(cmd, viperBindFlags(cmd,
flagSubnetGetID, flagSubnetGetID,
@ -296,7 +296,7 @@ const (
// command to manage subnet admins. // command to manage subnet admins.
var cmdSubnetAdmin = &cobra.Command{ var cmdSubnetAdmin = &cobra.Command{
Use: "admin", Use: "admin",
Short: "Manage administrators of the NeoFS subnet.", Short: "Manage administrators of the NeoFS subnet",
PreRun: func(cmd *cobra.Command, args []string) { PreRun: func(cmd *cobra.Command, args []string) {
viperBindFlags(cmd, viperBindFlags(cmd,
flagSubnetWallet, flagSubnetWallet,
@ -404,7 +404,7 @@ func manageSubnetAdmins(cmd *cobra.Command, rm bool) error {
// command to add subnet admin. // command to add subnet admin.
var cmdSubnetAdminAdd = &cobra.Command{ var cmdSubnetAdminAdd = &cobra.Command{
Use: "add", Use: "add",
Short: "Add admin to the NeoFS subnet.", Short: "Add admin to the NeoFS subnet",
PreRun: func(cmd *cobra.Command, _ []string) { PreRun: func(cmd *cobra.Command, _ []string) {
viperBindFlags(cmd, viperBindFlags(cmd,
flagSubnetAdminAddGroup, flagSubnetAdminAddGroup,
@ -419,7 +419,7 @@ var cmdSubnetAdminAdd = &cobra.Command{
// command to remove subnet admin. // command to remove subnet admin.
var cmdSubnetAdminRemove = &cobra.Command{ var cmdSubnetAdminRemove = &cobra.Command{
Use: "remove", Use: "remove",
Short: "Remove admin of the NeoFS subnet.", Short: "Remove admin of the NeoFS subnet",
PreRun: func(cmd *cobra.Command, _ []string) { PreRun: func(cmd *cobra.Command, _ []string) {
viperBindFlags(cmd, viperBindFlags(cmd,
flagSubnetAdminClient, flagSubnetAdminClient,
@ -443,7 +443,7 @@ const (
// command to manage subnet clients. // command to manage subnet clients.
var cmdSubnetClient = &cobra.Command{ var cmdSubnetClient = &cobra.Command{
Use: "client", Use: "client",
Short: "Manage clients of the NeoFS subnet.", Short: "Manage clients of the NeoFS subnet",
PreRun: func(cmd *cobra.Command, _ []string) { PreRun: func(cmd *cobra.Command, _ []string) {
viperBindFlags(cmd, viperBindFlags(cmd,
flagSubnetWallet, flagSubnetWallet,
@ -526,7 +526,7 @@ func manageSubnetClients(cmd *cobra.Command, rm bool) error {
// command to add subnet client. // command to add subnet client.
var cmdSubnetClientAdd = &cobra.Command{ var cmdSubnetClientAdd = &cobra.Command{
Use: "add", Use: "add",
Short: "Add client to the NeoFS subnet.", Short: "Add client to the NeoFS subnet",
RunE: func(cmd *cobra.Command, _ []string) error { RunE: func(cmd *cobra.Command, _ []string) error {
return manageSubnetClients(cmd, false) return manageSubnetClients(cmd, false)
}, },
@ -535,7 +535,7 @@ var cmdSubnetClientAdd = &cobra.Command{
// command to remove subnet client. // command to remove subnet client.
var cmdSubnetClientRemove = &cobra.Command{ var cmdSubnetClientRemove = &cobra.Command{
Use: "remove", Use: "remove",
Short: "Remove client of the NeoFS subnet.", Short: "Remove client of the NeoFS subnet",
RunE: func(cmd *cobra.Command, _ []string) error { RunE: func(cmd *cobra.Command, _ []string) error {
return manageSubnetClients(cmd, true) return manageSubnetClients(cmd, true)
}, },
@ -610,7 +610,7 @@ func manageSubnetNodes(cmd *cobra.Command, rm bool) error {
// command to manage subnet nodes. // command to manage subnet nodes.
var cmdSubnetNode = &cobra.Command{ var cmdSubnetNode = &cobra.Command{
Use: "node", Use: "node",
Short: "Manage nodes of the NeoFS subnet.", Short: "Manage nodes of the NeoFS subnet",
PreRun: func(cmd *cobra.Command, _ []string) { PreRun: func(cmd *cobra.Command, _ []string) {
viperBindFlags(cmd, viperBindFlags(cmd,
flagSubnetWallet, flagSubnetWallet,
@ -623,7 +623,7 @@ var cmdSubnetNode = &cobra.Command{
// command to add subnet node. // command to add subnet node.
var cmdSubnetNodeAdd = &cobra.Command{ var cmdSubnetNodeAdd = &cobra.Command{
Use: "add", Use: "add",
Short: "Add node to the NeoFS subnet.", Short: "Add node to the NeoFS subnet",
RunE: func(cmd *cobra.Command, _ []string) error { RunE: func(cmd *cobra.Command, _ []string) error {
return manageSubnetNodes(cmd, false) return manageSubnetNodes(cmd, false)
}, },
@ -632,7 +632,7 @@ var cmdSubnetNodeAdd = &cobra.Command{
// command to remove subnet node. // command to remove subnet node.
var cmdSubnetNodeRemove = &cobra.Command{ var cmdSubnetNodeRemove = &cobra.Command{
Use: "remove", Use: "remove",
Short: "Remove node from the NeoFS subnet.", Short: "Remove node from the NeoFS subnet",
RunE: func(cmd *cobra.Command, _ []string) error { RunE: func(cmd *cobra.Command, _ []string) error {
return manageSubnetNodes(cmd, true) return manageSubnetNodes(cmd, true)
}, },

View file

@ -48,7 +48,7 @@ const (
// RootCmd is a root command of config section. // RootCmd is a root command of config section.
var RootCmd = &cobra.Command{ var RootCmd = &cobra.Command{
Use: "storage-config [-w wallet] [-a acccount] [<path-to-config>]", Use: "storage-config [-w wallet] [-a acccount] [<path-to-config>]",
Short: "Section for storage node configuration commands.", Short: "Section for storage node configuration commands",
Run: storageConfig, Run: storageConfig,
} }