From 5b8d50fc8b0929f758639089bb1186222cd21955 Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Wed, 27 Mar 2013 14:54:49 +0100 Subject: Added some helper functions. These should make things more convenient (e.g. no need to Close() all the objects) --- librsync/librsync_test.go | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'librsync/librsync_test.go') diff --git a/librsync/librsync_test.go b/librsync/librsync_test.go index e0fd50f..256e344 100644 --- a/librsync/librsync_test.go +++ b/librsync/librsync_test.go @@ -2,28 +2,11 @@ package librsync import ( "bytes" - "fmt" "github.com/kch42/golibrsync/librsync/testdata" "io" - "os" "testing" ) -func dump(r io.Reader) (string, error) { - path := fmt.Sprintf("%s%cgolibrsync_test", os.TempDir(), os.PathSeparator) - file, err := os.Create(path) - if err != nil { - return "", err - } - defer file.Close() - - if _, err = io.Copy(file, r); err != nil { - return "", err - } - - return path, nil -} - func TestSignatureDeltaPatch(t *testing.T) { // Generate signature orig := bytes.NewReader(testdata.RandomData()) -- cgit v1.2.3-54-g00ecf