Documentation
¶
Index ¶
- Variables
- func CreateUserCacheDir(dirName string) (string, error)
- func CreateUserConfigDir(dirName string) (string, error)
- func CreateUserHomeDir(dirName string) (string, error)
- func GetCurrentUser() (string, error)
- func GetUserCacheDir() (string, error)
- func GetUserConfigDir() (string, error)
- func GetUserHomeDir() (string, error)
- func IsContainerEnv() bool
- func IsLinux() bool
- func IsMac() bool
- func IsUnix() bool
- func IsWSL() bool
- func IsWindows() bool
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUsernameNotFound = errors.New("username not found")
Functions ¶
func CreateUserCacheDir ¶
CreateUserCacheDir 在用户缓存目录下创建目录, 如果目录不存在则创建
func CreateUserConfigDir ¶
CreateUserConfigDir 在用户配置目录下创建目录, 如果目录不存在则创建
func CreateUserHomeDir ¶
CreateUserHomeDir 在用户主目录下创建目录, 如果目录不存在则创建
func GetUserCacheDir ¶
GetUserCacheDir 获取用户缓存目录 os.UserCacheDir
func GetUserConfigDir ¶
GetUserConfigDir 获取用户配置目录 os.UserConfigDir
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.