Documentation ¶
Overview ¶
package utils provides various utility functions for the application.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrDocFolderNotFound = errors.New("no documents folder found")
Functions ¶
func GetCacheDir ¶
GetCacheDir returns the user's (OS-specific) caching folder. If the folder is not found, an error is returned. If appDir is not empty, it is appended to the cacheDir and if the resulting folder does not exist, it is created.
func GetConfigDir ¶
GetConfigDir returns the user's (OS-specific) configuration folder. If the folder is not found, an error is returned. If appDir is not empty, it is appended to the configDir and if the resulting folder does not exist, it is created.
func GetDocumentsDir ¶
GetCacheDir returns the user's documents folder. The documents folder is the user's (OS-specific) home folder with the word "Documents" appended to it. If the home folder or the $HOME/Documents folder is not found, an error is returned.
Types ¶
This section is empty.