commit | f6a19238e11b36b1977e1d39a0c7134bf77cac53 | [log] [tgz] |
---|---|---|
author | Baokun Lee <nototon@gmail.com> | Wed Apr 11 00:08:24 2018 +0800 |
committer | Russ Cox <rsc@golang.org> | Tue Jun 12 02:31:17 2018 +0000 |
tree | cfe9837bff34310d61a4cf6faf9fffe94c31b563 | |
parent | f9946586d5c0c871b582c4bef9be4348e6f5301d [diff] |
cmd/go/internal/vgo: fix redundant code Eliminate a redundant err variable in func downloadZip. Change-Id: I0bba7b37118f6ec2ccccf23ef1de8bbadf0cd815 Reviewed-on: https://go-review.googlesource.com/106135 Reviewed-by: Bryan C. Mills <bcmills@google.com> Reviewed-by: Russ Cox <rsc@golang.org>
diff --git a/vendor/cmd/go/internal/vgo/fetch.go b/vendor/cmd/go/internal/vgo/fetch.go index 30ad8f7..c28353c 100644 --- a/vendor/cmd/go/internal/vgo/fetch.go +++ b/vendor/cmd/go/internal/vgo/fetch.go
@@ -110,10 +110,7 @@ if err := w.Close(); err != nil { return err } - if err := ioutil.WriteFile(target+"hash", []byte(hash), 0666); err != nil { - return err - } - return nil + return ioutil.WriteFile(target+"hash", []byte(hash), 0666) } var useModHash = false