-
Notifications
You must be signed in to change notification settings - Fork 319
/
root.go
28 lines (23 loc) · 1.01 KB
/
root.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright (c) 2019 IoTeX Foundation
// This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no
// warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent
// permitted by law, all liability for your use of the code is disclaimed. This source code is governed by Apache
// License 2.0 that can be found in the LICENSE file.
package cmd
import (
"github.com/spf13/cobra"
"go.uber.org/zap"
"github.com/iotexproject/iotex-core/pkg/log"
)
// rootCmd represents the base command when called without any subcommands
var rootCmd = &cobra.Command{
Use: "injector [command] [flags]",
Short: "Command-line interface for injecting actions",
Long: "injector is a command-line interface to generate address.",
}
// Execute adds all child commands to the root command and sets flags appropriately.
func Execute() {
if err := rootCmd.Execute(); err != nil {
log.L().Fatal("failed to add cmd", zap.Error(err))
}
}