-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
47 lines (42 loc) · 905 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
package main
import (
"fmt"
"os"
"github.com/ipfs-force-community/api-compare/cmd"
"github.com/ipfs-force-community/api-compare/version"
"github.com/urfave/cli/v2"
)
func main() {
app := &cli.App{
Name: "Compare the apis of venus and lotus",
Usage: "",
Flags: []cli.Flag{
cmd.LotusURLFlag,
cmd.LotusTokenFlag,
cmd.VenusURLFlag,
cmd.VenusTokenFlag,
&cli.IntFlag{
Name: "start-height",
Usage: "Start comparing the height of the API",
},
&cli.IntFlag{
Name: "stop-height",
Usage: "Stop after running n heights",
},
&cli.IntFlag{
Name: "concurrency",
Value: 1,
},
&cli.BoolFlag{
Name: "enable-eth-rpc",
Usage: "Need to compare ETH interfaces",
},
},
Version: version.UserVersion(),
Action: cmd.Run,
}
app.Setup()
if err := app.Run(os.Args); err != nil {
_, _ = fmt.Fprintf(os.Stderr, "ERR: %v\n", err)
}
}