ref(*): remove dead code

RIP
pull/1784/head
Adam Reese 8 years ago
parent 8824eabfee
commit 4418b1a20d

@ -50,8 +50,6 @@ func TestSortScore(t *testing.T) {
}
}
var testCacheDir = "../testdata/"
var indexfileEntries = map[string]repo.ChartVersions{
"niña": {
{

@ -216,29 +216,6 @@ func inMap(k rune, m map[rune]bool) bool {
return ok
}
func (t *parser) listVal() []rune {
v := []rune{}
for {
switch r, _, e := t.sc.ReadRune(); {
case e != nil:
// End of input or error with reader stops value parsing.
return v
case r == '\\':
//Escape char. Consume next and append.
next, _, e := t.sc.ReadRune()
if e != nil {
return v
}
v = append(v, next)
case r == ',':
//End of key. Consume ',' and return.
return v
default:
v = append(v, r)
}
}
}
func typedVal(v []rune) interface{} {
val := string(v)
if strings.EqualFold(val, "true") {

@ -16,12 +16,6 @@ limitations under the License.
package driver
import (
"bytes"
"fmt"
"io"
)
// labels is a map of key value pairs to be included as metadata in a configmap object.
type labels map[string]string
@ -52,15 +46,3 @@ func (lbs *labels) fromMap(kvs map[string]string) {
lbs.set(k, v)
}
}
func (lbs labels) dump(w io.Writer) error {
var b bytes.Buffer
fmt.Fprintln(&b, "labels:")
for k, v := range lbs {
fmt.Fprintf(&b, "\t- %q -> %q\n", k, v)
}
_, err := w.Write(b.Bytes())
return err
}

@ -17,9 +17,6 @@ limitations under the License.
package driver
import (
"bytes"
"fmt"
"io"
"strconv"
"strings"
"sync"
@ -153,28 +150,6 @@ func (mem *Memory) Delete(key string) (*rspb.Release, error) {
}
}
func (mem *Memory) dump(w io.Writer) error {
var b bytes.Buffer
fmt.Fprintln(&b, "memory:")
for key, recs := range mem.cache {
fmt.Fprintf(&b, "\t# %q\n", key)
recs.Iter(func(index int, r *record) bool {
fmt.Fprintf(&b, "\t\t- [%d] v%d (status = %s)\n",
index,
r.rls.Version,
r.rls.Info.Status.Code,
)
return true
})
}
_, err := w.Write(b.Bytes())
return err
}
// wlock locks mem for writing
func (mem *Memory) wlock() func() {
mem.Lock()

Loading…
Cancel
Save