mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-01-02 07:25:19 -05:00
Some code improvements
* Rewrite empty string checks more idiomatically. * Change strings.ToLower comparisons to strings.EqualFold. * Rewrite switch statement with only one case as if.
This commit is contained in:
@@ -39,7 +39,7 @@ func (b *Balancer) PickOutbound() (string, error) {
|
||||
return "", newError("no available outbounds selected")
|
||||
}
|
||||
tag := b.strategy.PickOutbound(tags)
|
||||
if len(tag) == 0 {
|
||||
if tag == "" {
|
||||
return "", newError("balancing strategy returns empty tag")
|
||||
}
|
||||
return tag, nil
|
||||
|
||||
Reference in New Issue
Block a user