forked from TrueCloudLab/frostfs-node
Move to frostfs-node
Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
This commit is contained in:
parent
42554a9298
commit
923f84722a
934 changed files with 3470 additions and 3451 deletions
29
cmd/frostfs-adm/internal/modules/config/root.go
Normal file
29
cmd/frostfs-adm/internal/modules/config/root.go
Normal file
|
@ -0,0 +1,29 @@
|
|||
package config
|
||||
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
const configPathFlag = "path"
|
||||
|
||||
var (
|
||||
// RootCmd is a root command of config section.
|
||||
RootCmd = &cobra.Command{
|
||||
Use: "config",
|
||||
Short: "Section for frostfs-adm config related commands",
|
||||
}
|
||||
|
||||
initCmd = &cobra.Command{
|
||||
Use: "init",
|
||||
Short: "Initialize basic frostfs-adm configuration file",
|
||||
Example: `frostfs-adm config init
|
||||
frostfs-adm config init --path .config/frostfs-adm.yml`,
|
||||
RunE: initConfig,
|
||||
}
|
||||
)
|
||||
|
||||
func init() {
|
||||
RootCmd.AddCommand(initCmd)
|
||||
|
||||
initCmd.Flags().String(configPathFlag, "", "Path to config (default ~/.frostfs/adm/config.yml)")
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue