-
Notifications
You must be signed in to change notification settings - Fork 81
/
main.go
53 lines (44 loc) · 850 Bytes
/
main.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package main
import (
"fmt"
"os"
"github.com/bitconch/bus/gobin/utils"
"gopkg.in/urfave/cli.v1"
)
var (
// LedgerLocation is the path for ledger file
LedgerLocation string
// HeadNum
gitCommit = ""
// add new App with description
app = utils.NewApp(gitCommit, "Bitconch chain genesis tool CLI")
)
// Global flags to be used in the cli
/*
var (
outfileFlag = cli.StringFlag{
Name: "outfile,o",
Usage: "Path to generated file",
Destination: &OutFile,
}
)
*/
//init define subcommand and flags linked to cli
func init() {
// define the sub commands
app.Commands = []cli.Command{
printCommand,
jsonCommand,
verifyCommand,
}
// define the global flags
app.Flags = []cli.Flag{
//outfileFlag,
}
}
func main() {
if err := app.Run(os.Args); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}