system

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAvailableTools

func GetAvailableTools() string

Types

type OSInfo

type OSInfo struct {
	Name    string `json:"name"`
	Version string `json:"version"`
	ID      string `json:"id"`
}

type SystemInfo

type SystemInfo struct {
	OS             OSInfo   `json:"os"`
	Arch           string   `json:"arch"`
	CPU            int      `json:"cpu"`
	Memory         string   `json:"memory"`
	AvailableTools []string `json:"available_tools"`
}

func GetSystemInfo

func GetSystemInfo() SystemInfo

func (SystemInfo) ToJSON

func (si SystemInfo) ToJSON() (string, error)

新增函数:将 SystemInfo 转换为 JSON 字符串

func (SystemInfo) ToPrettyJSON

func (si SystemInfo) ToPrettyJSON() (string, error)

新增函数:将 SystemInfo 转换为格式化的 JSON 字符串

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL