Skip to content

Commit

Permalink
move guard to switch
Browse files Browse the repository at this point in the history
Co-authored-by: Shash Reddy <shashwathireddy@gmail.com>
  • Loading branch information
joshrider and shashwathi committed Jul 12, 2019
1 parent 8f5abcd commit 24a1e5c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/reconciler/revision/resources/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,11 +315,9 @@ func makeQueueContainer(rev *v1alpha1.Revision, loggingConfig *logging.Config, o
}

func applyReadinessProbeDefaults(p *corev1.Probe, port int32) {
if p == nil {
return
}

switch {
case p == nil:
return
case p.HTTPGet != nil:
p.HTTPGet.Host = localAddress
p.HTTPGet.Port = intstr.FromInt(int(port))
Expand Down

0 comments on commit 24a1e5c

Please sign in to comment.