Fix some printfs, clean regexes, switch to fuzzy matching for search

This commit is contained in:
comp500
2019-11-01 15:46:50 +00:00
parent 33c93f3ac3
commit 5ba9ff5c73
8 changed files with 97 additions and 71 deletions

View File

@@ -65,7 +65,7 @@ var initCmd = &cobra.Command{
mcVersions, err := getValidMCVersions()
if err != nil {
fmt.Printf("Failed to get latest minecraft versions: %s", err)
fmt.Printf("Failed to get latest minecraft versions: %s\n", err)
os.Exit(1)
}

View File

@@ -62,7 +62,7 @@ var removeCmd = &cobra.Command{
os.Exit(1)
}
fmt.Printf("Mod %s removed successfully!", args[0])
fmt.Printf("Mod %s removed successfully!\n", args[0])
},
}

View File

@@ -47,7 +47,7 @@ var updateCmd = &cobra.Command{
for _, v := range index.GetAllMods() {
modData, err := core.LoadMod(v)
if err != nil {
fmt.Printf("Error reading mod file: %s", err.Error())
fmt.Printf("Error reading mod file: %s\n", err.Error())
continue
}
@@ -65,7 +65,7 @@ var updateCmd = &cobra.Command{
updaterMap[k] = append(slice, modData)
}
if !updaterFound {
fmt.Printf("A supported update system for \"%s\" cannot be found.", modData.Name)
fmt.Printf("A supported update system for \"%s\" cannot be found.\n", modData.Name)
}
}