Merge pull request #65390 from cfork/test

Automatic merge from submit-queue (batch tested with PRs 65518, 65624, 65380, 65390, 65586). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

cleanup: remove deadcode

/kind cleanup

remove deadcode
remove unnecessary conversion

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2018-06-29 18:30:16 -07:00 committed by GitHub
commit 16dbb95c51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 19 deletions

View File

@ -862,13 +862,6 @@ func appendIf(actions []action, a action, shouldAppend bool) []action {
return actions
}
// Wraps a http.Handler function inside a restful.RouteFunction
func routeFunction(handler http.Handler) restful.RouteFunction {
return func(restReq *restful.Request, restResp *restful.Response) {
handler.ServeHTTP(restResp.ResponseWriter, restReq.Request)
}
}
func addParams(route *restful.RouteBuilder, params []*restful.Parameter) {
for _, param := range params {
route.Param(param)

View File

@ -22,7 +22,6 @@ import (
"net/http"
"reflect"
"sync"
"time"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
@ -100,9 +99,6 @@ type etcdWatcher struct {
cache etcdCache
}
// watchWaitDuration is the amount of time to wait for an error from watch.
const watchWaitDuration = 100 * time.Millisecond
// newEtcdWatcher returns a new etcdWatcher; if list is true, watch sub-nodes.
// The versioner must be able to handle the objects that transform creates.
func newEtcdWatcher(list bool, quorum bool, include includeFunc, pred storage.SelectionPredicate,

View File

@ -73,11 +73,6 @@ type store struct {
leaseManager *leaseManager
}
type elemForDecode struct {
data []byte
rev uint64
}
type objState struct {
obj runtime.Object
meta *storage.ResponseMeta

View File

@ -94,7 +94,7 @@ func (p *Parser) consumeText() string {
// next returns the next rune in the input.
func (p *Parser) next() rune {
if int(p.pos) >= len(p.input) {
if p.pos >= len(p.input) {
p.width = 0
return eof
}
@ -266,7 +266,7 @@ Loop:
}
}
text := p.consumeText()
text = string(text[1 : len(text)-1])
text = text[1 : len(text)-1]
if text == "*" {
text = ":"
}
@ -373,7 +373,7 @@ Loop:
}
reg := regexp.MustCompile(`^([^!<>=]+)([!<>=]+)(.+?)$`)
text := p.consumeText()
text = string(text[:len(text)-2])
text = text[:len(text)-2]
value := reg.FindStringSubmatch(text)
if value == nil {
parser, err := parseAction("text", text)