working commit
This commit is contained in:
+12
-11
@@ -16,12 +16,6 @@ import (
|
||||
)
|
||||
|
||||
type Util struct {
|
||||
// TODO: delete mixed object and use simple object?
|
||||
accountcmd.AccountUtil
|
||||
filecmd.FileUtil
|
||||
imagecmd.ImageUtil
|
||||
accountcmd.GrantUtil
|
||||
|
||||
rootCmd *cobra.Command
|
||||
}
|
||||
|
||||
@@ -43,11 +37,18 @@ func (util *Util) Build() error {
|
||||
}
|
||||
rootCmd.CompletionOptions.DisableDefaultCmd = true
|
||||
|
||||
rootCmd.AddCommand(util.MakeFileCmds())
|
||||
rootCmd.AddCommand(util.MakeCollectionCmds())
|
||||
rootCmd.AddCommand(util.CreateImageCmds())
|
||||
rootCmd.AddCommand(util.MakeAccountCmds())
|
||||
rootCmd.AddCommand(util.MakeGrantCmds())
|
||||
fileUtil := filecmd.NewFileUtil()
|
||||
rootCmd.AddCommand(fileUtil.MakeFileCmds())
|
||||
rootCmd.AddCommand(fileUtil.MakeCollectionCmds())
|
||||
|
||||
imageUtil := imagecmd.NewImageUtil()
|
||||
rootCmd.AddCommand(imageUtil.CreateImageCmds())
|
||||
|
||||
accountUtil := accountcmd.NewAccountUtil()
|
||||
rootCmd.AddCommand(accountUtil.MakeAccountCmds())
|
||||
|
||||
grantUtil := accountcmd.NewGrantUtil()
|
||||
rootCmd.AddCommand(grantUtil.MakeGrantCmds())
|
||||
|
||||
util.rootCmd = rootCmd
|
||||
|
||||
|
||||
Reference in New Issue
Block a user