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 54876ce commit 41e095d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/reconciler/revision/resources/queue.go
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 41e095d

Please sign in to comment.