chore(schema): trim space in ip_port

This commit is contained in:
JianBo He 2022-07-25 09:33:47 +08:00
parent 18a7ed95d0
commit 74c5fd411b
1 changed files with 2 additions and 1 deletions

View File

@ -2137,7 +2137,8 @@ to_ip_port(Str) ->
{error, Str} {error, Str}
end. end.
split_ip_port(Str) -> split_ip_port(Str0) ->
Str = re:replace(Str0, " ", "", [{return, list}, global]),
case lists:split(string:rchr(Str, $:), Str) of case lists:split(string:rchr(Str, $:), Str) of
%% no port %% no port
{[], Str} -> {[], Str} ->