Skip to content

Commit

Permalink
remove unreachable branch
Browse files Browse the repository at this point in the history
  • Loading branch information
joshrider committed Jul 15, 2019
1 parent b8ea054 commit dbe0ec8
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pkg/apis/serving/k8s_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -470,12 +470,8 @@ func validateProbe(p *corev1.Probe) *apis.FieldError {
numHandlers := 0

if h.HTTPGet != nil {
if numHandlers > 0 {
errs = errs.Also(apis.ErrDisallowedFields("httpGet"))
} else {
numHandlers++
errs = errs.Also(apis.CheckDisallowedFields(*h.HTTPGet, *HTTPGetActionMask(h.HTTPGet))).ViaField("httpGet")
}
numHandlers++
errs = errs.Also(apis.CheckDisallowedFields(*h.HTTPGet, *HTTPGetActionMask(h.HTTPGet))).ViaField("httpGet")
}
if h.TCPSocket != nil {
if numHandlers > 0 {
Expand Down

0 comments on commit dbe0ec8

Please sign in to comment.