-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
52 lines (42 loc) · 1.17 KB
/
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
package main
import (
"context"
"fmt"
"os"
"github.com/sirupsen/logrus"
cli "github.com/urfave/cli/v2"
bdtCmd "github.com/migalabs/eth-pokhar/cmd/beacon-depositors-transactions"
iCmd "github.com/migalabs/eth-pokhar/cmd/identify"
"github.com/migalabs/eth-pokhar/utils"
)
var (
Version = "v0.0.1"
CliName = "eth-pokhar"
log = logrus.WithField(
"cli", "CliName",
)
)
func main() {
fmt.Println(CliName, Version)
customFormatter := new(logrus.TextFormatter)
customFormatter.FullTimestamp = true
// Set the general log configurations for the entire tool
// logrus.SetFormatter(utils.ParseLogFormatter("text"))
logrus.SetFormatter(customFormatter)
logrus.SetOutput(utils.ParseLogOutput("terminal"))
logrus.SetLevel(utils.ParseLogLevel("info"))
app := &cli.App{
Name: CliName,
Usage: "Repository to identify Ethereum entities and their belonging validators",
// UsageText: "eth [commands] [arguments...]",
EnableBashCompletion: true,
Commands: []*cli.Command{
bdtCmd.BeaconDepositorsTransactionsCommand,
iCmd.IdentifyCommand,
},
}
if err := app.RunContext(context.Background(), os.Args); err != nil {
log.Errorf("error: %v\n", err)
os.Exit(1)
}
}