diff --git a/rest/request.go b/rest/request.go index 64901fba..9609f01a 100644 --- a/rest/request.go +++ b/rest/request.go @@ -1195,7 +1195,6 @@ func IsValidPathSegmentPrefix(name string) []string { func ValidatePathSegmentName(name string, prefix bool) []string { if prefix { return IsValidPathSegmentPrefix(name) - } else { - return IsValidPathSegmentName(name) } + return IsValidPathSegmentName(name) } diff --git a/rest/request_test.go b/rest/request_test.go index a415f60a..e70770dc 100755 --- a/rest/request_test.go +++ b/rest/request_test.go @@ -1218,10 +1218,9 @@ func TestBackoffLifecycle(t *testing.T) { if count == 5 || count == 9 { w.WriteHeader(http.StatusOK) return - } else { - w.WriteHeader(http.StatusGatewayTimeout) - return } + w.WriteHeader(http.StatusGatewayTimeout) + return })) defer testServer.Close() c := testRESTClient(t, testServer)