-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.go
79 lines (65 loc) · 1.74 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
package main
import (
"github.com/workfoxes/thermite/constants"
"github.com/workfoxes/thermite/web"
)
// Set Thermite Global Variable
var (
Commit string
Date string
Version string
)
func init() {
}
// main : Start the Thermite and track it with the API
func main() {
web.StartThermite(constants.ApplicationName, constants.Port)
// fs := flag.NewFlagSet("thermite", flag.ExitOnError)
// // Print the version Information of Thermite
// version := fs.Bool("version", false, "Print version and exit")
// if *version {
// fmt.Printf("Version: %s\nCommit: %s\nRuntime: %s %s/%s\nDate: %s\n",
// Version,
// Commit,
// runtime.Version(),
// runtime.GOOS,
// runtime.GOARCH,
// Date,
// )
// return
// }
// cpus := fs.Int("cpus", runtime.NumCPU(), "Number of CPUs to use")
// // profile := fs.String("profile", "", "Enable profiling of [cpu, heap]")
// runtime.GOMAXPROCS(*cpus)
// // for _, prof := range strings.Split(*profile, ",") {
// // if prof = strings.TrimSpace(prof); prof == "" {
// // continue
// // }
// // f, err := os.Create(prof + ".pprof")
// // if err != nil {
// // log.Fatal(err)
// // }
// // defer f.Close()
// // switch {
// // case strings.HasPrefix(prof, "cpu"):
// // pprof.StartCPUProfile(f)
// // defer pprof.StopCPUProfile()
// // case strings.HasPrefix(prof, "heap"):
// // defer pprof.Lookup("heap").WriteTo(f, 0)
// // }
// // }
// cmd.ThermiteUsageDocs(fs)
// fs.Parse(os.Args[1:])
// args := fs.Args()
// log.Print(args)
// if len(args) == 0 {
// fs.Usage()
// os.Exit(1)
// }
// _cmd, ok := cmd.Commands[args[0]]
// if !ok {
// log.Fatalf("Invalid Command : %s", args)
// } else if err := _cmd.fn(args[1:]); err != nil {
// log.Fatal(err)
// }
}