1
0
mirror of https://github.com/golang/go synced 2024-11-27 03:41:22 -07:00

os: fix nits found by vet

Change-Id: I97812575ff9c69301a5ce2e1c814b40e1da32a55
Reviewed-on: https://go-review.googlesource.com/11271
Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
Mikio Hara 2015-06-19 09:36:25 +09:00
parent 3269683250
commit 2f3d103f55

View File

@ -1064,26 +1064,26 @@ func TestProgWideChdir(t *testing.T) {
}
oldwd, err := Getwd()
if err != nil {
t.Fatal("Getwd: %v", err)
t.Fatalf("Getwd: %v", err)
}
d, err := ioutil.TempDir("", "test")
if err != nil {
t.Fatal("TempDir: %v", err)
t.Fatalf("TempDir: %v", err)
}
defer func() {
if err := Chdir(oldwd); err != nil {
t.Fatal("Chdir: %v", err)
t.Fatalf("Chdir: %v", err)
}
RemoveAll(d)
}()
if err := Chdir(d); err != nil {
t.Fatal("Chdir: %v", err)
t.Fatalf("Chdir: %v", err)
}
// OS X sets TMPDIR to a symbolic link.
// So we resolve our working directory again before the test.
d, err = Getwd()
if err != nil {
t.Fatal("Getwd: %v", err)
t.Fatalf("Getwd: %v", err)
}
close(c)
for i := 0; i < N; i++ {