From cf33bd75a8243ac701090bb6fa8e0b81b9746fcb Mon Sep 17 00:00:00 2001 From: Dmitri Shuralyov Date: Wed, 18 Nov 2015 16:56:09 -0800 Subject: [PATCH] In restore errors, mention which package had the problem. This improves the situation when the user runs `godep restore` and sees a few instances of "restore, during download dep" errors. Previously, it was not mentioned which packages failed to download. Turning on -v verbose mode was not a good solution since it prints too much other information for successfully processed packages. --- Changelog.md | 4 ++++ restore.go | 4 ++-- version.go | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Changelog.md b/Changelog.md index 4b95010..97013ff 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,7 @@ +# v31 2015/12/2 + +* In restore, mention which package had the problem -- @shurcool + # v30 2015/11/25 * Add `-t` flag to the `godep get` command. diff --git a/restore.go b/restore.go index e0ba3d1..216ed03 100644 --- a/restore.go +++ b/restore.go @@ -29,7 +29,7 @@ func runRestore(cmd *Command, args []string) { for _, dep := range g.Deps { err := download(dep) if err != nil { - log.Println("restore, during download dep:", err) + log.Printf("restore, during download dep %q: %v\n", dep.ImportPath, err) hadError = true } } @@ -37,7 +37,7 @@ func runRestore(cmd *Command, args []string) { for _, dep := range g.Deps { err := restore(dep) if err != nil { - log.Println("restore, during restore dep:", err) + log.Printf("restore, during restore dep %q: %v\n", dep.ImportPath, err) hadError = true } } diff --git a/version.go b/version.go index 72af285..11576b3 100644 --- a/version.go +++ b/version.go @@ -5,7 +5,7 @@ import ( "runtime" ) -const version = 30 +const version = 31 var cmdVersion = &Command{ Usage: "version",