Documentation ¶
Index ¶
- func Bold(text string) string
- func CheckExistAndCreate(dir string)
- func Copy(src, dest string, recursive bool, filters []string) error
- func CopyFile(srcPath, dest string) error
- func Fatal(err error)
- func FindAppPath() string
- func FindPrefFilePath() string
- func GetExecutableDir() string
- func GetJsHelperDir() string
- func GetSpotifyVersion(prefsPath string) string
- func ModifyFile(path string, repl func(string) string)
- func PrependTime(text string) string
- func PrintBold(text string)
- func PrintError(text string)
- func PrintGreen(text string)
- func PrintInfo(text string)
- func PrintRed(text string)
- func PrintSuccess(text string)
- func PrintWarning(text string)
- func ReadAnswer(info string, defaultAnswer bool) bool
- func Replace(input *string, regexpTerm string, replaceTerm string)
- func Unzip(src, dest string) error
- type Color
- type Config
- type Tracker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckExistAndCreate ¶
func CheckExistAndCreate(dir string)
CheckExistAndCreate checks folder existence and make that folder if it does not exist
func FindAppPath ¶ added in v0.4.0
func FindAppPath() string
FindAppPath finds Spotify location in various possible places of each platform and returns it. Returns blank string if none of default locations exists.
func FindPrefFilePath ¶ added in v0.4.0
func FindPrefFilePath() string
FindPrefFilePath finds Spotify "prefs" file location in various possible places of each platform and returns it. Returns blank string if none of default locations exists.
func GetExecutableDir ¶
func GetExecutableDir() string
GetExecutableDir returns directory of current process
func GetJsHelperDir ¶
func GetJsHelperDir() string
GetJsHelperDir returns jsHelper directory in executable directory
func ModifyFile ¶
ModifyFile opens file, changes file content by executing `repl` callback function and writes new content.
func PrependTime ¶ added in v0.3.0
PrependTime prepends current time string to text and returns new string
func ReadAnswer ¶
ReadAnswer prints out a yes/no form with string from `info` and returns boolean value based on user input (y/Y or n/N) or return `defaultAnswer` if input is omitted. If input is neither of them, print form again.
Types ¶
type Color ¶
Color stores hex and rgb value of color
func ParseColor ¶
ParseColor parses a string in both hex or rgb and converts to both rgb and hex value
type Config ¶
Config .
func ParseConfig ¶
ParseConfig read config file content, return default config if file doesn't exist.