diff --git a/ncdomain/convert_test.go b/ncdomain/convert_test.go index 17177be..61fdb61 100644 --- a/ncdomain/convert_test.go +++ b/ncdomain/convert_test.go @@ -40,18 +40,19 @@ func stripTag(L string) string { func suiteReader(t *testing.T) <-chan testItem { testItemChan := make(chan testItem, 20) - go func() { - gopath := os.Getenv("GOPATH") - if gopath == "" { - gopath = "." - } + gopath := os.Getenv("GOPATH") + if gopath == "" { + gopath = "." + } - fpath := filepath.Join(gopath, "src/github.com/hlandau/nctestsuite/testsuite.txt") - f, err := os.Open(fpath) + fpath := filepath.Join(gopath, "src/github.com/hlandau/nctestsuite/testsuite.txt") + f, err := os.Open(fpath) - if err != nil { - t.Fatalf("Error: Couldn't open %s: %+v", fpath, err) - } + if err != nil { + t.Fatalf("Error: Couldn't open %s: %+v", fpath, err) + } + + go func() { defer f.Close() lineChan := make(chan string, 20)