Run go fmt

This commit is contained in:
comp500 2024-08-28 18:54:13 +01:00
parent f05bbe1dd4
commit c391e1cfdd

View File

@ -35,7 +35,7 @@ var rehashCmd = &cobra.Command{
fmt.Println(err)
os.Exit(1)
}
session, err := core.CreateDownloadSession(mods, []string{args[0]})
if err != nil {
fmt.Printf("Error retrieving external files: %v\n", err)
@ -43,7 +43,7 @@ var rehashCmd = &cobra.Command{
}
for dl := range session.StartDownloads() {
if dl.Error != nil {
fmt.Printf("Error retrieving %s: %v\n", dl.Mod.Name, dl.Error);
fmt.Printf("Error retrieving %s: %v\n", dl.Mod.Name, dl.Error)
}
dl.Mod.Download.HashFormat = args[0]
dl.Mod.Download.Hash = dl.Hashes[args[0]]
@ -54,25 +54,25 @@ var rehashCmd = &cobra.Command{
}
// TODO pass the hash to index instead of recomputing from scratch
}
err = index.Refresh()
if err != nil {
fmt.Printf("Error refreshing index: %v\n", err)
os.Exit(1)
}
err = index.Write()
if err != nil {
fmt.Printf("Error writing index: %v\n", err)
os.Exit(1)
}
err = pack.UpdateIndexHash()
if err != nil {
fmt.Printf("Error updating index hash: %v\n", err)
os.Exit(1)
}
err = pack.Write()
if err != nil {
fmt.Printf("Error writing pack: %v\n", err)