-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.go
52 lines (46 loc) · 1.04 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 (
"fmt"
"log"
"os"
cmd "github.com/eminmuhammadi/packeta/cmd"
cli "github.com/urfave/cli/v2"
)
var VERSION = "0.1.1-dev"
var BUILD_ID = "0"
var BUILD_TIME = "0"
// Commands list
var Commands = []*cli.Command{
cmd.Iface(),
cmd.Capture(),
}
// Main entry point
func main() {
fmt.Println(`
/
___ __ ___ /-__ ___ _/_- __
/ ) / ) / ' /( /___) / / )
/___/ (___(_ (___ _/ \ (___ (_ (___(_
/
/
`)
app := &cli.App{
Name: "packeta",
Usage: "Network packet analyzer",
Version: VERSION,
Copyright: "packeta Copyright (C) 2022 Emin Muhammadi",
ExtraInfo: func() map[string]string {
return map[string]string{
"LICENSE": "The GNU General Public License",
"VERSION": VERSION,
"BUILD": BUILD_ID,
"BUILD_TIME": BUILD_TIME,
}
},
Commands: Commands,
Suggest: true,
}
if err := app.Run(os.Args); err != nil {
log.Fatal(err)
}
}