]> Cypherpunks.ru repositories - gostls13.git/commitdiff
test: add a go.mod file in the working directory of nosplit.go
authorBryan C. Mills <bcmills@google.com>
Fri, 22 Feb 2019 20:58:15 +0000 (15:58 -0500)
committerBryan C. Mills <bcmills@google.com>
Tue, 26 Feb 2019 02:44:45 +0000 (02:44 +0000)
Updates #30228

Change-Id: I41bbedf15fa51242f69a3b1ecafd0d3191271799
Reviewed-on: https://go-review.googlesource.com/c/163518
Reviewed-by: Jay Conrod <jayconrod@google.com>
test/nosplit.go

index 734f456cc990c8c3fb456931044a7e2fabc29068..46810b1a2f8f94b9bf94975463307356937b7ab8 100644 (file)
@@ -218,6 +218,10 @@ func main() {
        }
        defer os.RemoveAll(dir)
 
+       if err := ioutil.WriteFile(filepath.Join(dir, "go.mod"), []byte("module go-test-nosplit\n"), 0666); err != nil {
+               log.Panic(err)
+       }
+
        tests = strings.Replace(tests, "\t", " ", -1)
        tests = commentRE.ReplaceAllString(tests, "")