Skip to content

Commit

Permalink
remove check
Browse files Browse the repository at this point in the history
Signed-off-by: muyuan0 <127020730+muyuan0@users.noreply.github.com>
  • Loading branch information
muyuan0 committed Mar 8, 2023
1 parent 0f0c640 commit 1677eb1
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions internal/ir/xds.go
Original file line number Diff line number Diff line change
Expand Up @@ -402,14 +402,11 @@ func NewRouteDest(host string, port uint32) *RouteDestination {
}

func NewRouteDestWithWeight(host string, port uint32, weight uint32) *RouteDestination {
rd := &RouteDestination{
Host: host,
Port: port,
}
if weight != 0 {
rd.Weight = &weight
return &RouteDestination{
Host: host,
Port: port,
Weight: &weight,
}
return rd
}

// AddHeader configures a header to be added to a request or response.
Expand Down

0 comments on commit 1677eb1

Please sign in to comment.