system

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(args []string) error

Types

type Config

type Config struct {
	XML    bool
	JSON   bool
	Plain  bool
	Pretty bool
}

type OSInfo

type OSInfo struct {
	XMLName   xml.Name `xml:"os"`
	GOOS      string   `xml:"goos,attr"`
	GOARCH    string   `xml:"goarch,attr"`
	Hostname  string   `xml:"hostname,attr"`
	Kernel    string   `xml:"kernel,attr"`
	OSRelease string   `xml:"os_release,attr"`
	Distro    string   `xml:"distro,attr"`
}

type RuntimeInfo

type RuntimeInfo struct {
	XMLName      xml.Name `xml:"runtime"`
	Version      string   `xml:"version,attr"`
	NumCPU       int      `xml:"num_cpu,attr"`
	NumGoroutine int      `xml:"num_goroutine,attr"`
}

type SystemError

type SystemError struct {
	XMLName xml.Name `xml:"error"`
	Code    int      `xml:"code,attr"`
	Msg     string   `xml:"msg,attr"`
}

type SystemResult

type SystemResult struct {
	XMLName   xml.Name      `xml:"system"`
	Timestamp int64         `xml:"timestamp,attr"`
	User      UserInfo      `xml:"user"`
	OS        OSInfo        `xml:"os"`
	Runtime   RuntimeInfo   `xml:"runtime"`
	Errors    []SystemError `xml:"error,omitempty"`
}

type UserInfo

type UserInfo struct {
	XMLName  xml.Name `xml:"user"`
	Username string   `xml:"username,attr"`
	UID      string   `xml:"uid,attr"`
	GID      string   `xml:"gid,attr"`
	Home     string   `xml:"home,attr"`
	Shell    string   `xml:"shell,attr"`
	Groups   []string `xml:"group"`
}

Jump to

Keyboard shortcuts

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