Documentation ¶
Index ¶
- 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 FindFlag(args []string, flags ...string) bool
- func GetExecutableDir() string
- func GetJsHelperDir() string
- func GetPrefsCfg(spotifyPath string) (*ini.File, string, error)
- func GetSpotifyVersion(spotifyPath 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) string
- func RestartSpotify(spotifyPath 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 Copy ¶ added in v0.3.0
Copy .
func FindFlag ¶ added in v0.3.0
FindFlag finds flags in arrays of arguments returns true if one of requested flags is found
func GetExecutableDir ¶
func GetExecutableDir() string
GetExecutableDir returns directory of current process
func GetJsHelperDir ¶
func GetJsHelperDir() string
GetJsHelperDir retuns jsHelper directory in executable directory
func GetPrefsCfg ¶
GetPrefsCfg finds `prefs` file path based on OS and returns an `ini.File` ref.
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.
func Replace ¶
Replace uses Regexp to find any matched from `input` with `regexpTerm` and replaces them with `replaceTerm` then returns new string.
Types ¶
type Color ¶
Color stores hex and rgb value of color
type Config ¶
Config .