mirror of
https://github.com/oneclickvirt/basics.git
synced 2025-10-07 01:23:00 +08:00
update
This commit is contained in:
@@ -2,7 +2,11 @@
|
|||||||
|
|
||||||
[](https://hits.seeyoufarm.com) [](https://github.com/oneclickvirt/basics/actions/workflows/main.yaml)
|
[](https://hits.seeyoufarm.com) [](https://github.com/oneclickvirt/basics/actions/workflows/main.yaml)
|
||||||
|
|
||||||
系统基础信息查询模块
|
系统基础信息查询模块 (System Basic Information Query Module)
|
||||||
|
|
||||||
|
## Information
|
||||||
|
|
||||||
|
Use ```-l``` to specify the output language, currently ```en``` and ```zh``` are supported.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
@@ -58,23 +58,23 @@ case $os in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
OpenBSD)
|
# OpenBSD)
|
||||||
case $arch in
|
# case $arch in
|
||||||
amd64)
|
# amd64)
|
||||||
wget -O basics https://github.com/oneclickvirt/basics/releases/download/output/basics-openbsd-amd64
|
# wget -O basics https://github.com/oneclickvirt/basics/releases/download/output/basics-openbsd-amd64
|
||||||
;;
|
# ;;
|
||||||
"i386" | "i686")
|
# "i386" | "i686")
|
||||||
wget -O basics https://github.com/oneclickvirt/basics/releases/download/output/basics-openbsd-386
|
# wget -O basics https://github.com/oneclickvirt/basics/releases/download/output/basics-openbsd-386
|
||||||
;;
|
# ;;
|
||||||
"armv7l" | "armv8" | "armv8l" | "aarch64")
|
# "armv7l" | "armv8" | "armv8l" | "aarch64")
|
||||||
wget -O basics https://github.com/oneclickvirt/basics/releases/download/output/basics-openbsd-arm64
|
# wget -O basics https://github.com/oneclickvirt/basics/releases/download/output/basics-openbsd-arm64
|
||||||
;;
|
# ;;
|
||||||
*)
|
# *)
|
||||||
echo "Unsupported architecture: $arch"
|
# echo "Unsupported architecture: $arch"
|
||||||
exit 1
|
# exit 1
|
||||||
;;
|
# ;;
|
||||||
esac
|
# esac
|
||||||
;;
|
# ;;
|
||||||
*)
|
*)
|
||||||
echo "Unsupported operating system: $os"
|
echo "Unsupported operating system: $os"
|
||||||
exit 1
|
exit 1
|
||||||
|
14
cmd/main.go
14
cmd/main.go
@@ -1,6 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
@@ -10,12 +11,21 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
languagePtr := flag.String("l", "", "Language parameter (en or zh)")
|
||||||
|
flag.Parse()
|
||||||
|
var language string
|
||||||
|
if *languagePtr == "" {
|
||||||
|
language = "zh"
|
||||||
|
} else {
|
||||||
|
language = *languagePtr
|
||||||
|
}
|
||||||
|
language = strings.ToLower(language)
|
||||||
go func() {
|
go func() {
|
||||||
http.Get("https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Foneclickvirt%2Fbasics&count_bg=%232EFFF8&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=hits&edge_flat=false")
|
http.Get("https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Foneclickvirt%2Fbasics&count_bg=%232EFFF8&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=hits&edge_flat=false")
|
||||||
}()
|
}()
|
||||||
fmt.Println("项目地址:", "https://github.com/oneclickvirt/basics")
|
fmt.Println("项目地址:", "https://github.com/oneclickvirt/basics")
|
||||||
ipInfo, _, _ := network.NetworkCheck("both", false, "zh")
|
ipInfo, _, _ := network.NetworkCheck("both", false, language)
|
||||||
res := system.CheckSystemInfo("zh")
|
res := system.CheckSystemInfo(language)
|
||||||
fmt.Println("--------------------------------------------------")
|
fmt.Println("--------------------------------------------------")
|
||||||
fmt.Printf(strings.ReplaceAll(res+ipInfo, "\n\n", "\n"))
|
fmt.Printf(strings.ReplaceAll(res+ipInfo, "\n\n", "\n"))
|
||||||
fmt.Println("--------------------------------------------------")
|
fmt.Println("--------------------------------------------------")
|
||||||
|
Reference in New Issue
Block a user