NewRootCmd creates a new root command for akash. It is called once in the main function.
()
| 26 | // NewRootCmd creates a new root command for akash. It is called once in the |
| 27 | // main function. |
| 28 | func NewRootCmd() (*cobra.Command, sdkutil.EncodingConfig) { |
| 29 | encodingConfig := sdkutil.MakeEncodingConfig() |
| 30 | app.ModuleBasics().RegisterInterfaces(encodingConfig.InterfaceRegistry) |
| 31 | |
| 32 | rootCmd := &cobra.Command{ |
| 33 | Use: "akash", |
| 34 | Short: "Akash Blockchain Application", |
| 35 | Long: `Akash CLI Utility. |
| 36 | |
| 37 | Akash is a peer-to-peer marketplace for computing resources and |
| 38 | a deployment platform for heavily distributed applications. |
| 39 | Find out more at https://akash.network`, |
| 40 | SilenceUsage: true, |
| 41 | PersistentPreRunE: cli.GetPersistentPreRunE(encodingConfig, []string{"AKASH"}, cli.DefaultHome, cli.WithPreRunAppConfig(InitAppConfig())), |
| 42 | } |
| 43 | |
| 44 | initRootCmd(rootCmd, encodingConfig) |
| 45 | |
| 46 | return rootCmd, encodingConfig |
| 47 | } |
| 48 | |
| 49 | // Execute executes the root command. |
| 50 | func Execute(rootCmd *cobra.Command, envPrefix string) error { |
no test coverage detected