diff options
Diffstat (limited to 'Godeps/_workspace/src/github.com/braintree/manners/test_helpers/temp_file.go')
-rw-r--r-- | Godeps/_workspace/src/github.com/braintree/manners/test_helpers/temp_file.go | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/Godeps/_workspace/src/github.com/braintree/manners/test_helpers/temp_file.go b/Godeps/_workspace/src/github.com/braintree/manners/test_helpers/temp_file.go deleted file mode 100644 index c4aa263a0..000000000 --- a/Godeps/_workspace/src/github.com/braintree/manners/test_helpers/temp_file.go +++ /dev/null @@ -1,27 +0,0 @@ -package test_helpers - -import ( - "io/ioutil" - "os" -) - -type TempFile struct { - *os.File -} - -func NewTempFile(content []byte) (*TempFile, error) { - f, err := ioutil.TempFile("", "graceful-test") - if err != nil { - return nil, err - } - - f.Write(content) - return &TempFile{f}, nil -} - -func (tf *TempFile) Unlink() { - if tf.File != nil { - os.Remove(tf.Name()) - tf.File = nil - } -} |