Commit 9a25d46e authored by xichengliudui's avatar xichengliudui

Delete some redundant code

Delete some redundant code
parent 27cf50d8
...@@ -1195,7 +1195,6 @@ func IsValidPathSegmentPrefix(name string) []string { ...@@ -1195,7 +1195,6 @@ func IsValidPathSegmentPrefix(name string) []string {
func ValidatePathSegmentName(name string, prefix bool) []string { func ValidatePathSegmentName(name string, prefix bool) []string {
if prefix { if prefix {
return IsValidPathSegmentPrefix(name) return IsValidPathSegmentPrefix(name)
} else {
return IsValidPathSegmentName(name)
} }
return IsValidPathSegmentName(name)
} }
...@@ -1218,10 +1218,9 @@ func TestBackoffLifecycle(t *testing.T) { ...@@ -1218,10 +1218,9 @@ func TestBackoffLifecycle(t *testing.T) {
if count == 5 || count == 9 { if count == 5 || count == 9 {
w.WriteHeader(http.StatusOK) w.WriteHeader(http.StatusOK)
return return
} else {
w.WriteHeader(http.StatusGatewayTimeout)
return
} }
w.WriteHeader(http.StatusGatewayTimeout)
return
})) }))
defer testServer.Close() defer testServer.Close()
c := testRESTClient(t, testServer) c := testRESTClient(t, testServer)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment