Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEnvironment ¶
func GetEnvironment() []string
GetEnvironment returns the current environment variables as a slice of strings.
func GetGroups ¶
GetGroups retrieves the names of the groups that the current user belongs to. It returns a slice of strings representing the group names and an error if any.
func GetUsername ¶
GetUsername returns the username of the current user. It retrieves the current user using the user.Current() function. If an error occurs while getting the current user, it returns an empty string and the error.
Types ¶
type OSInfo ¶
type SystemInfo ¶
func GetSystemInfo ¶
func GetSystemInfo() SystemInfo
GetSystemInfo retrieves information about the system. It returns a SystemInfo struct containing the total memory in gigabytes, the CPU model name, and the number of CPU cores.
Click to show internal directories.
Click to hide internal directories.