Documentation
¶
Index ¶
- func BindEnv(name, defValue string) (bindVal string)
- func Dir(fpath string) string
- func Filename(fpath string) string
- func FindFilesWithExt(dir string, extension string) ([]string, error)
- func FindFilesWithExtRecursive(dir string, extension string) ([]string, error)
- func GetDeviceIdentifier() (string, error)
- func GetFontFiles(dir string) ([]string, error)
- func GetSystemFontPath() ([]string, error)
- func IsExistDir(fPath string) bool
- func IsExistFile(fPath string) bool
- func IsExistPath(fPath string) bool
- func IsExistUrlFile(url string) (bool, error)
- func IsLinux() bool
- func IsMac() bool
- func IsSupport256Color() bool
- func IsSupportColor() bool
- func IsSupportTrueColor() bool
- func IsWin() bool
- func Remove(fpath string) error
- func Rename(oldPath, newPath string) error
- func ResetPacProxy() error
- func ResetSocksProxy() error
- func ResetWebProxy() error
- func SetPacProxy(pacUrl string) error
- func SetSocksProxy(server string, port int) error
- func SetWebProxy(server string, port int) error
- type PacProxyConfig
- type SocksProxyConfig
- type WebProxyConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindFilesWithExt ¶ added in v1.11.6
func FindFilesWithExtRecursive ¶ added in v1.11.6
func GetDeviceIdentifier ¶ added in v1.11.24
func GetFontFiles ¶ added in v1.11.20
func GetSystemFontPath ¶ added in v1.11.20
func IsExistDir ¶
func IsExistFile ¶
func IsExistPath ¶
func IsExistUrlFile ¶ added in v1.11.34
func IsSupport256Color ¶
func IsSupport256Color() bool
IsSupport256Color checks current console whether supports 256 color.
func IsSupportColor ¶
func IsSupportColor() bool
IsSupportColor checks current console whether supports color. Supported: linux, mac, or windows's ConEmu, Cmder, putty, git-bash.exe Not support: windows cmd.exe, powerShell.exe
func IsSupportTrueColor ¶
func IsSupportTrueColor() bool
IsSupportTrueColor checks current console whether supports true color.
func ResetPacProxy ¶ added in v1.11.41
func ResetPacProxy() error
func ResetSocksProxy ¶ added in v1.11.41
func ResetSocksProxy() error
func SetPacProxy ¶ added in v1.11.41
func SetSocksProxy ¶ added in v1.11.41
func SetWebProxy ¶ added in v1.11.41
Types ¶
type PacProxyConfig ¶ added in v1.11.41
type PacProxyConfig struct { Enable bool `json:"enable"` // 是否启用 PAC 代理 PacURL string `json:"pacURL"` // PAC 代理地址 }
func GetPacProxy ¶ added in v1.11.41
func GetPacProxy() (*PacProxyConfig, error)
func (PacProxyConfig) ToString ¶ added in v1.11.41
func (self PacProxyConfig) ToString() string
type SocksProxyConfig ¶ added in v1.11.41
type SocksProxyConfig struct { Server string `json:"server"` // 服务器地址 (如 127.0.0.1) Port int `json:"port"` // 端口号 (如 1080) Enable bool `json:"enable"` }
func GetSocksProxyInfo ¶ added in v1.11.41
func GetSocksProxyInfo() (*SocksProxyConfig, error)
func (SocksProxyConfig) ToString ¶ added in v1.11.41
func (self SocksProxyConfig) ToString() string
type WebProxyConfig ¶ added in v1.11.41
type WebProxyConfig struct { Server string `json:"server"` // 服务器地址 (如 127.0.0.1) Port int `json:"port"` // 端口号 (如 1080) Enable bool `json:"enable"` }
func GetWebProxyInfo ¶ added in v1.11.41
func GetWebProxyInfo() (*WebProxyConfig, error)
func (WebProxyConfig) ToString ¶ added in v1.11.41
func (self WebProxyConfig) ToString() string
Click to show internal directories.
Click to hide internal directories.