Documentation ¶
Overview ¶
The system Pacakge is a utility pacakge meant to interface with system operations like opening an application or setting the clipboard text
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetClipboardText ¶
GetClipboardText returns a string of the clipboard text. It may return an error if unable to get the contents.
func GetOS ¶
func GetOS() string
GetOS will return runtime.GOOS this is the running program's operating system target: one of darwin, freebsd, linux, and so on.
func GetProcessorCount ¶
func GetProcessorCount() int
GetProcessorCount returns the number of logical CPUs usable by the current process.
func OpenUrl ¶
func OpenUrl(url string)
OpenUrl will open a file, directory, or URI using the OS's default application for that object type.
See github.com/skratchdot/open-golang
func SetClipboardText ¶
SetClipboardText will attempt to set the clipboard text with the provided string. It will return an error if it was unable to.
Types ¶
type PowerState ¶
type PowerState int
PowerState defines the battery connection to the PC
const ( POWERSTATE_UNKNOWN PowerState = sdl.POWERSTATE_UNKNOWN POWERSTATE_ON_BATTERY PowerState = sdl.POWERSTATE_ON_BATTERY POWERSTATE_NO_BATTERY PowerState = sdl.POWERSTATE_NO_BATTERY POWERSTATE_CHARGING PowerState = sdl.POWERSTATE_CHARGING POWERSTATE_CHARGED PowerState = sdl.POWERSTATE_CHARGED )
func GetPowerInfo ¶
func GetPowerInfo() (PowerState, int, int)
GetPowerInfo will return the PowerSate, seconds of battery left, and percentage of battery power.