• Masih H. Derkani's avatar
    Avoid writing to files in testdata · c3a59556
    Masih H. Derkani authored
    Avoid writing to files in `testdata` through examples. This is because
    when tests that use those file are run in parallel will fail if files
    are modified. Instead write to a temporary file in examples, and
    whenever opening testdata files in `RW` mode, make a temporary copy.
    
    Thanks to @mvdan for pointing this out.
    
    Fixes #175
    c3a59556
example_test.go 2.58 KB