Documentation ¶
Overview ¶
Package system contain some functions about os, runtime, shell command.
Index ¶
- func CompareOsEnv(key, comparedEnv string) bool
- func ExecCommand(command string) (stdout, stderr string, err error)
- func GetOsBits() int
- func GetOsEnv(key string) string
- func IsLinux() bool
- func IsMac() bool
- func IsWindows() bool
- func RemoveOsEnv(key string) error
- func SetOsEnv(key, value string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareOsEnv ¶
CompareOsEnv gets env named by the key and compare it with comparedEnv
func ExecCommand ¶
ExecCommand use shell /bin/bash -c to execute command
func GetOsBits ¶ added in v2.1.3
func GetOsBits() int
GetOsBits get this system bits 32bit or 64bit return bit int (32/64)
func RemoveOsEnv ¶
RemoveOsEnv remove a single environment variable.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.