MCPcopy Index your code
hub / github.com/Threadfin/Threadfin / main

Function main

threadfin.go:70–235  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

68var bindIpAddress = flag.String("bind", "", ": Bind IP address")
69
70func main() {
71
72 // Build-Nummer von der Versionsnummer trennen
73 var build = strings.Split(Version, ".")
74
75 var system = &src.System
76 system.APIVersion = APIVersion
77 system.Branch = strings.ToTitle(GitHub.Branch)
78 system.Build = build[len(build)-1:][0]
79 system.DBVersion = DBVersion
80 system.GitHub = GitHub
81 system.Name = Name
82 system.Version = strings.Join(build[0:len(build)-1], ".")
83
84 // Panic !!!
85 defer func() {
86
87 if r := recover(); r != nil {
88
89 fmt.Println()
90 fmt.Println("* * * * * FATAL ERROR * * * * *")
91 fmt.Println("OS: ", runtime.GOOS)
92 fmt.Println("Arch:", runtime.GOARCH)
93 fmt.Println("Err: ", r)
94 fmt.Println()
95
96 pc := make([]uintptr, 20)
97 runtime.Callers(2, pc)
98
99 for i := range pc {
100
101 if runtime.FuncForPC(pc[i]) != nil {
102
103 f := runtime.FuncForPC(pc[i])
104 file, line := f.FileLine(pc[i])
105
106 if string(file)[0:1] != "?" {
107 fmt.Printf("%s:%d %s\n", filepath.Base(file), line, f.Name())
108 }
109
110 }
111
112 }
113
114 fmt.Println()
115 fmt.Println("* * * * * * * * * * * * * * * *")
116
117 }
118
119 }()
120
121 flag.Parse()
122
123 if *h {
124 flag.Usage()
125 return
126 }
127

Callers

nothing calls this directly

Calls 7

InitFunction · 0.92
ShowErrorFunction · 0.92
ShowSystemInfoFunction · 0.92
ThreadfinRestoreFromCLIFunction · 0.92
BinaryUpdateFunction · 0.92
StartWebserverFunction · 0.92
StartSystemFunction · 0.92

Tested by

no test coverage detected