Commit b6e91380 authored by Emil Hessman's avatar Emil Hessman Committed by Minux Ma

cmd/pack: address go vet reports

Use log.Fatalf for formatting directives instead of log.Fatal

Change-Id: Ia207b320f5795c63cdfa71f92c19ca6d05cc833f
Reviewed-on: https://go-review.googlesource.com/2160Reviewed-by: 's avatarMinux Ma <minux@golang.org>
parent b2a950bb
...@@ -183,7 +183,7 @@ func existingArchive(name string) bool { ...@@ -183,7 +183,7 @@ func existingArchive(name string) bool {
if os.IsNotExist(err) { if os.IsNotExist(err) {
return false return false
} }
log.Fatal("cannot open file: %s", err) log.Fatalf("cannot open file: %s", err)
} }
checkHeader(fd) checkHeader(fd)
fd.Close() fd.Close()
...@@ -196,7 +196,7 @@ func checkHeader(fd *os.File) { ...@@ -196,7 +196,7 @@ func checkHeader(fd *os.File) {
buf := make([]byte, len(arHeader)) buf := make([]byte, len(arHeader))
_, err := io.ReadFull(fd, buf) _, err := io.ReadFull(fd, buf)
if err != nil || string(buf) != arHeader { if err != nil || string(buf) != arHeader {
log.Fatal("%s is not an archive: bad header", fd.Name()) log.Fatalf("%s is not an archive: bad header", fd.Name())
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment