ref: 91ffc76b24081da0b4b45023261fcedf7e088b15
parent: 0fb31e4a823f1469bf288097a99d3744ee719acf
author: Bjørn Erik Pedersen <[email protected]>
date: Mon Mar 14 11:20:36 EDT 2016
helpers: Remove unused code
--- a/helpers/general_test.go
+++ b/helpers/general_test.go
@@ -14,9 +14,7 @@
package helpers
import (
- "bytes"
"github.com/stretchr/testify/assert"
- "io/ioutil"
"reflect"
"strings"
"testing"
@@ -153,23 +151,6 @@
for i := 0; i < b.N; i++ {
for i, this := range containsBenchTestData {
result := ReaderContains(StringToReader(this.v1), this.v2)
- if result != this.expect {
- b.Errorf("[%d] got %t but expected %t", i, result, this.expect)
- }
- }
- }
-}
-
-// 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)
}
--- a/helpers/path.go
+++ b/helpers/path.go
@@ -67,7 +67,6 @@
}
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.