From ad81b6c90a63a8d64b37844be331101a2b4249b1 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Tue, 28 Jun 2022 09:03:52 +0300 Subject: [PATCH] [#1555] neofs-adm: Remove trailing dots from help messages Signed-off-by: Evgenii Stratonikov --- cmd/neofs-adm/internal/modules/config/root.go | 4 +-- cmd/neofs-adm/internal/modules/morph/root.go | 14 +++++----- .../internal/modules/morph/subnet.go | 28 +++++++++---------- .../internal/modules/storagecfg/root.go | 2 +- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/cmd/neofs-adm/internal/modules/config/root.go b/cmd/neofs-adm/internal/modules/config/root.go index 0f445cb2f7..bfbe3eef92 100644 --- a/cmd/neofs-adm/internal/modules/config/root.go +++ b/cmd/neofs-adm/internal/modules/config/root.go @@ -10,12 +10,12 @@ var ( // RootCmd is a root command of config section. RootCmd = &cobra.Command{ Use: "config", - Short: "Section for neofs-adm config related commands.", + Short: "Section for neofs-adm config related commands", } initCmd = &cobra.Command{ Use: "init", - Short: "Initialize basic neofs-adm configuration file.", + Short: "Initialize basic neofs-adm configuration file", Example: `neofs-adm config init neofs-adm config init --path .config/neofs-adm.yml`, RunE: initConfig, diff --git a/cmd/neofs-adm/internal/modules/morph/root.go b/cmd/neofs-adm/internal/modules/morph/root.go index 46ac04f04e..66527a3b91 100644 --- a/cmd/neofs-adm/internal/modules/morph/root.go +++ b/cmd/neofs-adm/internal/modules/morph/root.go @@ -44,7 +44,7 @@ var ( // RootCmd is a root command of config section. RootCmd = &cobra.Command{ Use: "morph", - Short: "Section for morph network configuration commands.", + Short: "Section for morph network configuration commands", } generateAlphabetCmd = &cobra.Command{ @@ -135,7 +135,7 @@ var ( dumpContractHashesCmd = &cobra.Command{ Use: "dump-hashes", - Short: "Dump deployed contract hashes.", + Short: "Dump deployed contract hashes", PreRun: func(cmd *cobra.Command, _ []string) { _ = viper.BindPFlag(endpointFlag, cmd.Flags().Lookup(endpointFlag)) }, @@ -144,7 +144,7 @@ var ( dumpNetworkConfigCmd = &cobra.Command{ Use: "dump-config", - Short: "Dump NeoFS network config.", + Short: "Dump NeoFS network config", PreRun: func(cmd *cobra.Command, _ []string) { _ = viper.BindPFlag(endpointFlag, cmd.Flags().Lookup(endpointFlag)) }, @@ -162,7 +162,7 @@ var ( updateContractsCmd = &cobra.Command{ Use: "update-contracts", - Short: "Update NeoFS contracts.", + Short: "Update NeoFS contracts", PreRun: func(cmd *cobra.Command, _ []string) { _ = viper.BindPFlag(alphabetWalletsFlag, cmd.Flags().Lookup(alphabetWalletsFlag)) _ = viper.BindPFlag(endpointFlag, cmd.Flags().Lookup(endpointFlag)) @@ -172,7 +172,7 @@ var ( dumpContainersCmd = &cobra.Command{ Use: "dump-containers", - Short: "Dump NeoFS containers to file.", + Short: "Dump NeoFS containers to file", PreRun: func(cmd *cobra.Command, _ []string) { _ = viper.BindPFlag(endpointFlag, cmd.Flags().Lookup(endpointFlag)) }, @@ -181,7 +181,7 @@ var ( restoreContainersCmd = &cobra.Command{ Use: "restore-containers", - Short: "Restore NeoFS containers from file.", + Short: "Restore NeoFS containers from file", PreRun: func(cmd *cobra.Command, _ []string) { _ = viper.BindPFlag(alphabetWalletsFlag, cmd.Flags().Lookup(alphabetWalletsFlag)) _ = viper.BindPFlag(endpointFlag, cmd.Flags().Lookup(endpointFlag)) @@ -191,7 +191,7 @@ var ( depositNotaryCmd = &cobra.Command{ Use: "deposit-notary", - Short: "Deposit GAS for notary service.", + Short: "Deposit GAS for notary service", PreRun: func(cmd *cobra.Command, _ []string) { _ = viper.BindPFlag(endpointFlag, cmd.Flags().Lookup(endpointFlag)) }, diff --git a/cmd/neofs-adm/internal/modules/morph/subnet.go b/cmd/neofs-adm/internal/modules/morph/subnet.go index e41e478fdb..b1e41a1248 100644 --- a/cmd/neofs-adm/internal/modules/morph/subnet.go +++ b/cmd/neofs-adm/internal/modules/morph/subnet.go @@ -38,7 +38,7 @@ func viperBindFlags(cmd *cobra.Command, flags ...string) { // subnet command section. var cmdSubnet = &cobra.Command{ Use: "subnet", - Short: "NeoFS subnet management.", + Short: "NeoFS subnet management", PreRun: func(cmd *cobra.Command, _ []string) { viperBindFlags(cmd, endpointFlag, @@ -115,7 +115,7 @@ func readSubnetKey(key *keys.PrivateKey) error { // create subnet command. var cmdSubnetCreate = &cobra.Command{ Use: "create", - Short: "Create NeoFS subnet.", + Short: "Create NeoFS subnet", PreRun: func(cmd *cobra.Command, _ []string) { viperBindFlags(cmd, flagSubnetWallet, @@ -180,7 +180,7 @@ var errZeroSubnet = errors.New("zero subnet") // remove subnet command. var cmdSubnetRemove = &cobra.Command{ Use: "remove", - Short: "Remove NeoFS subnet.", + Short: "Remove NeoFS subnet", PreRun: func(cmd *cobra.Command, _ []string) { viperBindFlags(cmd, flagSubnetWallet, @@ -214,7 +214,7 @@ var cmdSubnetRemove = &cobra.Command{ return fmt.Errorf("morph invocation: %w", err) } - cmd.Println("Remove subnet request sent successfully.") + cmd.Println("Remove subnet request sent successfully") return nil }, @@ -229,7 +229,7 @@ const ( // get subnet command. var cmdSubnetGet = &cobra.Command{ Use: "get", - Short: "Read information about the NeoFS subnet.", + Short: "Read information about the NeoFS subnet", PreRun: func(cmd *cobra.Command, _ []string) { viperBindFlags(cmd, flagSubnetGetID, @@ -296,7 +296,7 @@ const ( // command to manage subnet admins. var cmdSubnetAdmin = &cobra.Command{ Use: "admin", - Short: "Manage administrators of the NeoFS subnet.", + Short: "Manage administrators of the NeoFS subnet", PreRun: func(cmd *cobra.Command, args []string) { viperBindFlags(cmd, flagSubnetWallet, @@ -404,7 +404,7 @@ func manageSubnetAdmins(cmd *cobra.Command, rm bool) error { // command to add subnet admin. var cmdSubnetAdminAdd = &cobra.Command{ Use: "add", - Short: "Add admin to the NeoFS subnet.", + Short: "Add admin to the NeoFS subnet", PreRun: func(cmd *cobra.Command, _ []string) { viperBindFlags(cmd, flagSubnetAdminAddGroup, @@ -419,7 +419,7 @@ var cmdSubnetAdminAdd = &cobra.Command{ // command to remove subnet admin. var cmdSubnetAdminRemove = &cobra.Command{ Use: "remove", - Short: "Remove admin of the NeoFS subnet.", + Short: "Remove admin of the NeoFS subnet", PreRun: func(cmd *cobra.Command, _ []string) { viperBindFlags(cmd, flagSubnetAdminClient, @@ -443,7 +443,7 @@ const ( // command to manage subnet clients. var cmdSubnetClient = &cobra.Command{ Use: "client", - Short: "Manage clients of the NeoFS subnet.", + Short: "Manage clients of the NeoFS subnet", PreRun: func(cmd *cobra.Command, _ []string) { viperBindFlags(cmd, flagSubnetWallet, @@ -526,7 +526,7 @@ func manageSubnetClients(cmd *cobra.Command, rm bool) error { // command to add subnet client. var cmdSubnetClientAdd = &cobra.Command{ Use: "add", - Short: "Add client to the NeoFS subnet.", + Short: "Add client to the NeoFS subnet", RunE: func(cmd *cobra.Command, _ []string) error { return manageSubnetClients(cmd, false) }, @@ -535,7 +535,7 @@ var cmdSubnetClientAdd = &cobra.Command{ // command to remove subnet client. var cmdSubnetClientRemove = &cobra.Command{ Use: "remove", - Short: "Remove client of the NeoFS subnet.", + Short: "Remove client of the NeoFS subnet", RunE: func(cmd *cobra.Command, _ []string) error { return manageSubnetClients(cmd, true) }, @@ -610,7 +610,7 @@ func manageSubnetNodes(cmd *cobra.Command, rm bool) error { // command to manage subnet nodes. var cmdSubnetNode = &cobra.Command{ Use: "node", - Short: "Manage nodes of the NeoFS subnet.", + Short: "Manage nodes of the NeoFS subnet", PreRun: func(cmd *cobra.Command, _ []string) { viperBindFlags(cmd, flagSubnetWallet, @@ -623,7 +623,7 @@ var cmdSubnetNode = &cobra.Command{ // command to add subnet node. var cmdSubnetNodeAdd = &cobra.Command{ Use: "add", - Short: "Add node to the NeoFS subnet.", + Short: "Add node to the NeoFS subnet", RunE: func(cmd *cobra.Command, _ []string) error { return manageSubnetNodes(cmd, false) }, @@ -632,7 +632,7 @@ var cmdSubnetNodeAdd = &cobra.Command{ // command to remove subnet node. var cmdSubnetNodeRemove = &cobra.Command{ Use: "remove", - Short: "Remove node from the NeoFS subnet.", + Short: "Remove node from the NeoFS subnet", RunE: func(cmd *cobra.Command, _ []string) error { return manageSubnetNodes(cmd, true) }, diff --git a/cmd/neofs-adm/internal/modules/storagecfg/root.go b/cmd/neofs-adm/internal/modules/storagecfg/root.go index 3b398f0edf..45fd9abb61 100644 --- a/cmd/neofs-adm/internal/modules/storagecfg/root.go +++ b/cmd/neofs-adm/internal/modules/storagecfg/root.go @@ -48,7 +48,7 @@ const ( // RootCmd is a root command of config section. var RootCmd = &cobra.Command{ Use: "storage-config [-w wallet] [-a acccount] []", - Short: "Section for storage node configuration commands.", + Short: "Section for storage node configuration commands", Run: storageConfig, }