diff --git a/api/api.go b/api/api.go index 7abf83e..c215e8c 100644 --- a/api/api.go +++ b/api/api.go @@ -2,6 +2,7 @@ package api import ( "encoding/json" + "fmt" "io/ioutil" "os" "r2go/utils" @@ -114,15 +115,20 @@ func SearchMods(inp string) fuzzy.Ranks { // GetModData gets object of mod by depString func GetModData(depString string) (int, Mod) { + // ThinkInvis-Yeet + fmt.Printf("Getting data for: %s\n", depString) + fmt.Println([]byte(depString)) if depString == "R2API" { depString = "tristanmcpherson-R2API" } for i := 0; i < len(PkgList); i++ { if PkgList[i].FullName == depString { + fmt.Println("Got mod data!") return 0, PkgList[i] } } + fmt.Println("Couldn't get mod data :(") return 1, Mod{} } diff --git a/cli/cli.go b/cli/cli.go index d6f6177..65dda84 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -45,6 +45,8 @@ func InstallMod(pkg string) []string { // RemoveMod is a CLI frontend for tools.RemoveMod func RemoveMod(pkg string) { + // ThinkInvis-Yeet + // fmt.Println(pkg) blue := color.New(color.FgBlue).SprintFunc() red := color.New(color.FgRed).SprintFunc() cyan := color.New(color.FgCyan).SprintFunc() diff --git a/tools/tools.go b/tools/tools.go index fdf0ac9..4a33f34 100644 --- a/tools/tools.go +++ b/tools/tools.go @@ -1,6 +1,7 @@ package tools import ( + "fmt" "io/ioutil" "log" "os" @@ -83,9 +84,11 @@ func DownloadMod(depString string) (int, string, []string) { // RemoveMod uninstalls a mod // RemoveMod returns 2 if the mod string was not found, 1 if the mod isn't installed and 0 on success func RemoveMod(depString string) int { + // ThinkInvis-Yeet // fmt.Println(depString) status, mod := api.GetModData(depString) - // fmt.Println(mod) + fmt.Println(status) + fmt.Println(mod) if status != 0 { return 2 }