mirror of
https://github.com/oneclickvirt/basics.git
synced 2025-10-06 17:17:15 +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)
|
||||
|
||||
系统基础信息查询模块
|
||||
系统基础信息查询模块 (System Basic Information Query Module)
|
||||
|
||||
## Information
|
||||
|
||||
Use ```-l``` to specify the output language, currently ```en``` and ```zh``` are supported.
|
||||
|
||||
## Usage
|
||||
|
||||
|
@@ -58,23 +58,23 @@ case $os in
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
OpenBSD)
|
||||
case $arch in
|
||||
amd64)
|
||||
wget -O basics https://github.com/oneclickvirt/basics/releases/download/output/basics-openbsd-amd64
|
||||
;;
|
||||
"i386" | "i686")
|
||||
wget -O basics https://github.com/oneclickvirt/basics/releases/download/output/basics-openbsd-386
|
||||
;;
|
||||
"armv7l" | "armv8" | "armv8l" | "aarch64")
|
||||
wget -O basics https://github.com/oneclickvirt/basics/releases/download/output/basics-openbsd-arm64
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported architecture: $arch"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
# OpenBSD)
|
||||
# case $arch in
|
||||
# amd64)
|
||||
# wget -O basics https://github.com/oneclickvirt/basics/releases/download/output/basics-openbsd-amd64
|
||||
# ;;
|
||||
# "i386" | "i686")
|
||||
# wget -O basics https://github.com/oneclickvirt/basics/releases/download/output/basics-openbsd-386
|
||||
# ;;
|
||||
# "armv7l" | "armv8" | "armv8l" | "aarch64")
|
||||
# wget -O basics https://github.com/oneclickvirt/basics/releases/download/output/basics-openbsd-arm64
|
||||
# ;;
|
||||
# *)
|
||||
# echo "Unsupported architecture: $arch"
|
||||
# exit 1
|
||||
# ;;
|
||||
# esac
|
||||
# ;;
|
||||
*)
|
||||
echo "Unsupported operating system: $os"
|
||||
exit 1
|
||||
|
14
cmd/main.go
14
cmd/main.go
@@ -1,6 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
@@ -10,12 +11,21 @@ import (
|
||||
)
|
||||
|
||||
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() {
|
||||
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")
|
||||
ipInfo, _, _ := network.NetworkCheck("both", false, "zh")
|
||||
res := system.CheckSystemInfo("zh")
|
||||
ipInfo, _, _ := network.NetworkCheck("both", false, language)
|
||||
res := system.CheckSystemInfo(language)
|
||||
fmt.Println("--------------------------------------------------")
|
||||
fmt.Printf(strings.ReplaceAll(res+ipInfo, "\n\n", "\n"))
|
||||
fmt.Println("--------------------------------------------------")
|
||||
|
Reference in New Issue
Block a user