feat(d-eyes): init

This commit is contained in:
zitn
2023-11-06 16:31:16 +08:00
parent 804617ded3
commit 270bb18b98
117 changed files with 19222 additions and 0 deletions

27
basicinfo/info/base.go Normal file
View File

@@ -0,0 +1,27 @@
package info
import (
"fmt"
"os/user"
"github.com/gookit/color"
"github.com/shirou/gopsutil/v3/host"
)
func DisplayBaseInfo() {
infoStat, _ := host.Info()
platform := infoStat.Platform + " " + infoStat.PlatformVersion
OsKernel := infoStat.KernelArch + " " + infoStat.KernelVersion
CurrentUser, _ := user.Current()
color.Greenp("* ")
fmt.Println("OS VERSION: ", platform)
color.Greenp("* ")
fmt.Println("KERNEL VERSION: ", OsKernel)
color.Greenp("* ")
fmt.Println("CURRENT USER: ", CurrentUser.Username)
}