1
0
mirror of https://github.com/golang/go synced 2024-11-23 06:10:05 -07:00

os: improved code based on review feedback

This commit is contained in:
Felix Kollmann 2018-04-18 23:04:03 +02:00
parent 4d68b14701
commit 3ba7abcc96

View File

@ -1020,7 +1020,6 @@ func TestSymlinkCreation(t *testing.T) {
t.Skip("Windows developer mode is not active") t.Skip("Windows developer mode is not active")
} }
// create dummy file to symlink
temp, err := ioutil.TempDir("", "TestSymlinkCreation") temp, err := ioutil.TempDir("", "TestSymlinkCreation")
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
@ -1030,13 +1029,13 @@ func TestSymlinkCreation(t *testing.T) {
dummyFile := filepath.Join(temp, "file") dummyFile := filepath.Join(temp, "file")
err = ioutil.WriteFile(dummyFile, []byte(""), 0644) err = ioutil.WriteFile(dummyFile, []byte(""), 0644)
if err != nil { if err != nil {
t.Fatalf("Failed to create dummy file: %v", err) t.Fatal(err)
} }
linkFile := filepath.Join(temp, "link") linkFile := filepath.Join(temp, "link")
err = os.Symlink(dummyFile, linkFile) err = os.Symlink(dummyFile, linkFile)
if err != nil { if err != nil {
t.Fatalf("Failed to create symlink: %v", err) t.Fatal(err)
} }
} }