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

Function ShowSystemInfo

src/info.go:9–100  ·  view source on GitHub ↗

ShowSystemInfo : Systeminformationen anzeigen

()

Source from the content-addressed store, hash-verified

7
8// ShowSystemInfo : Systeminformationen anzeigen
9func ShowSystemInfo() {
10
11 fmt.Print("Creating the information takes a moment...")
12 err := buildDatabaseDVR()
13 if err != nil {
14 ShowError(err, 0)
15 return
16 }
17
18 buildXEPG()
19
20 fmt.Println("OK")
21 println()
22
23 fmt.Println(fmt.Sprintf("Version: %s %s.%s", System.Name, System.Version, System.Build))
24 fmt.Println(fmt.Sprintf("Branch: %s", System.Branch))
25 fmt.Println(fmt.Sprintf("GitHub: %s/%s | Git update = %t", System.GitHub.User, System.GitHub.Repo, System.GitHub.Update))
26 fmt.Println(fmt.Sprintf("Folder (config): %s", System.Folder.Config))
27
28 fmt.Println(fmt.Sprintf("Streams: %d / %d", len(Data.Streams.Active), len(Data.Streams.All)))
29 fmt.Println(fmt.Sprintf("Filter: %d", len(Data.Filter)))
30 fmt.Println(fmt.Sprintf("XEPG Chanels: %d", int(Data.XEPG.XEPGCount)))
31
32 println()
33 fmt.Println(fmt.Sprintf("IPv4 Addresses:"))
34
35 for i, ipv4 := range System.IPAddressesV4 {
36
37 switch count := i; {
38
39 case count < 10:
40 fmt.Println(fmt.Sprintf(" %d. %s", count, ipv4))
41 break
42 case count < 100:
43 fmt.Println(fmt.Sprintf(" %d. %s", count, ipv4))
44 break
45
46 }
47
48 }
49
50 println()
51 fmt.Println(fmt.Sprintf("IPv6 Addresses:"))
52
53 for i, ipv4 := range System.IPAddressesV6 {
54
55 switch count := i; {
56
57 case count < 10:
58 fmt.Println(fmt.Sprintf(" %d. %s", count, ipv4))
59 break
60 case count < 100:
61 fmt.Println(fmt.Sprintf(" %d. %s", count, ipv4))
62 break
63
64 }
65
66 }

Callers 1

mainFunction · 0.92

Calls 3

buildDatabaseDVRFunction · 0.85
ShowErrorFunction · 0.85
buildXEPGFunction · 0.85

Tested by

no test coverage detected