[#1041] cmd/*: factor out autocomplet command generation
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
fe29080ebb
commit
efabffbfd0
4 changed files with 69 additions and 114 deletions
|
@ -6,6 +6,7 @@ import (
|
|||
"github.com/nspcc-dev/neofs-node/cmd/neofs-adm/internal/modules/config"
|
||||
"github.com/nspcc-dev/neofs-node/cmd/neofs-adm/internal/modules/morph"
|
||||
"github.com/nspcc-dev/neofs-node/misc"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/util/autocomplete"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
@ -34,7 +35,7 @@ func init() {
|
|||
rootCmd.AddCommand(config.RootCmd)
|
||||
rootCmd.AddCommand(morph.RootCmd)
|
||||
|
||||
rootCmd.AddCommand(completionCmd)
|
||||
rootCmd.AddCommand(autocomplete.Command("neofs-adm"))
|
||||
}
|
||||
|
||||
func Execute() error {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue