Documentation
¶
Index ¶
- Variables
- func Blue(text string) string
- func Bold(text string) string
- func CheckExistAndCreate(dir string)
- func CheckExistAndDelete(dir string)
- func Copy(src, dest string, recursive bool, filters []string) error
- func CopyFile(srcPath, dest string) error
- func CreateJunction(location, destination string) error
- func Fatal(err error)
- func FindAppPath() string
- func FindPrefFilePath() string
- func FindSymbol(debugInfo, content string, clues []string) []string
- func GetDebuggerPath() string
- func GetExecutableDir() string
- func GetJsHelperDir() string
- func GetSpotifyVersion(prefsPath string) string
- func Green(text 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 Red(text string) string
- func Replace(input *string, regexpTerm string, replaceTerm string)
- func SendReload(debuggerURL *string) error
- func Unzip(src, dest string) error
- func Watch(fileList []string, callbackEach func(fileName string, err error), ...)
- func WatchRecursive(root string, callbackEach func(fileName string, err error), ...)
- func Yellow(text string) string
- type Color
- type Config
- type TernaryBool
- type Tracker
Constants ¶
This section is empty.
Variables ¶
var ( // BaseColorList is color names list and their default values BaseColorList = map[string]string{ "main_fg": "ffffff", "secondary_fg": "c0c0c0", "main_bg": "282828", "sidebar_and_player_bg": "000000", "cover_overlay_and_shadow": "000000", "indicator_fg_and_button_bg": "1db954", "pressing_fg": "cdcdcd", "slider_bg": "404040", "sidebar_indicator_and_hover_button_bg": "1ed660", "scrollbar_fg_and_selected_row_bg": "333333", "pressing_button_fg": "cccccc", "pressing_button_bg": "179443", "selected_button": "18ac4d", "miscellaneous_bg": "4687d6", "miscellaneous_hover_bg": "2e77d0", "preserve_1": "ffffff", } // BaseColorOrder is color name list in an order BaseColorOrder = []string{ "main_fg", "secondary_fg", "main_bg", "sidebar_and_player_bg", "cover_overlay_and_shadow", "indicator_fg_and_button_bg", "pressing_fg", "slider_bg", "sidebar_indicator_and_hover_button_bg", "scrollbar_fg_and_selected_row_bg", "pressing_button_fg", "pressing_button_bg", "selected_button", "miscellaneous_bg", "miscellaneous_hover_bg", "preserve_1", } )
var ( // INTERVAL . INTERVAL = 200 * time.Millisecond )
Functions ¶
func CheckExistAndCreate ¶
func CheckExistAndCreate(dir string)
CheckExistAndCreate checks folder existence and makes that folder, rescursively, if it does not exist
func CheckExistAndDelete ¶ added in v0.9.6
func CheckExistAndDelete(dir string)
CheckExistAndDelete checks folder existence and deletes that folder if it does exist
func CreateJunction ¶ added in v0.7.0
CreateJunction creates a junction in Windows or a symlink in Linux/Mac.
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 FindSymbol ¶ added in v0.5.0
FindSymbol uses regexp from one or multiple clues to find variable or function symbol in obfursted code.
func GetDebuggerPath ¶ added in v1.0.0
func GetDebuggerPath() string
GetDebuggerPath fetches opening debugger list from localhost and returns the Spotify one.
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 Replace ¶
Replace uses Regexp to find any matched from `input` with `regexpTerm` and replaces them with `replaceTerm` then returns new string.
func SendReload ¶ added in v1.0.0
SendReload sends reload command to debugger Websocket server
func WatchRecursive ¶ added in v0.8.0
func WatchRecursive(root string, callbackEach func(fileName string, err error), callbackAfter func())
WatchRecursive .
Types ¶
type Color ¶
Color stores hex and rgb value of color
func ParseColor ¶
ParseColor parses a string in both hex or rgb or from XResources or env variable 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.
type TernaryBool ¶ added in v0.9.1
type TernaryBool int
TernaryBool is three-way boolean: default, true, false
func (TernaryBool) ToForceOperator ¶ added in v0.9.1
func (b TernaryBool) ToForceOperator() string
ToForceOperator .