XTLS / Xray-core

Xray, Penetrates Everything. Also the best v2ray-core, with XTLS support. Fully compatible configuration.
https://t.me/projectXray
Mozilla Public License 2.0
25.78k stars 3.97k forks source link

Use a more direct and less error-prone return value #4005

Closed pinglanlu closed 1 week ago

pinglanlu commented 1 week ago

Since err != nil has been judged before, nil is returned directly here, which is more obvious, readable and less error-prone.

Just like https://github.com/XTLS/Xray-core/blob/44b1dd0e674347691c62a13d227edf0d36b7e290/proxy/proxy.go#L538

Fangliding commented 1 week ago

Thank you for your attention. But I think this change is too small and not worth opening a PR. If you can collect and correct more of these problems, we would be glad to merge, or I can fix this in the next change

pinglanlu commented 1 week ago

Thank you for your attention. But I think this change is too small and not worth opening a PR. If you can collect and correct more of these problems, we would be glad to merge, or I can fix this in the next change

Thank you for your reply. Please give me some time to find and modify all the cases and resubmit them.