Skip to content

Commit

Permalink
[xds_client_rafactor_step_2] line -1
Browse files Browse the repository at this point in the history
  • Loading branch information
menghanl committed Nov 8, 2021
1 parent d9cbece commit f37daa6
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions xds/internal/xdsclient/pubsub/dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,29 +25,25 @@ import (
func rawFromCache(s string, cache interface{}) *anypb.Any {
switch c := cache.(type) {
case map[string]xdsresource.ListenerUpdate:
v, ok := c[s]
if !ok {
return nil
if v, ok := c[s]; ok {
return v.Raw
}
return v.Raw
return nil
case map[string]xdsresource.RouteConfigUpdate:
v, ok := c[s]
if !ok {
return nil
if v, ok := c[s]; ok {
return v.Raw
}
return v.Raw
return nil
case map[string]xdsresource.ClusterUpdate:
v, ok := c[s]
if !ok {
return nil
if v, ok := c[s]; ok {
return v.Raw
}
return v.Raw
return nil
case map[string]xdsresource.EndpointsUpdate:
v, ok := c[s]
if !ok {
return nil
if v, ok := c[s]; ok {
return v.Raw
}
return v.Raw
return nil
default:
return nil
}
Expand Down

0 comments on commit f37daa6

Please sign in to comment.