helpers: Remove unused code
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 14 Mar 2016 14:20:36 +0000 (15:20 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 14 Mar 2016 14:20:36 +0000 (15:20 +0100)
helpers/general_test.go
helpers/path.go

index 83e532dbfd2e4244a8a4b08bc545f755750d0c51..e735620caf22201a077873cb33c67d40b6bb6142 100644 (file)
@@ -14,9 +14,7 @@
 package helpers
 
 import (
-       "bytes"
        "github.com/stretchr/testify/assert"
-       "io/ioutil"
        "reflect"
        "strings"
        "testing"
@@ -160,23 +158,6 @@ func BenchmarkReaderContains(b *testing.B) {
        }
 }
 
-// kept to compare the above
-func _BenchmarkReaderContains(b *testing.B) {
-       b.ResetTimer()
-       for i := 0; i < b.N; i++ {
-               for i, this := range containsBenchTestData {
-                       bs, err := ioutil.ReadAll(StringToReader(this.v1))
-                       if err != nil {
-                               b.Fatalf("Failed %s", err)
-                       }
-                       result := bytes.Contains(bs, this.v2)
-                       if result != this.expect {
-                               b.Errorf("[%d] got %t but expected %t", i, result, this.expect)
-                       }
-               }
-       }
-}
-
 func TestUniqueStrings(t *testing.T) {
        in := []string{"a", "b", "a", "b", "c", "", "a", "", "d"}
        output := UniqueStrings(in)
index 5536241e52a823b32a6ed31a3cbbd303b1cd762a..75e46f5529f820e2657a369ceea4757311653a51 100644 (file)
@@ -67,7 +67,6 @@ func (filepathBridge) Separator() string {
 }
 
 var fpb filepathBridge
-var sanitizeRegexp = regexp.MustCompile("[^a-zA-Z0-9./_-]")
 
 // MakePath takes a string with any characters and replace it
 // so the string could be used in a path.