caicancai commented on code in PR #1770: URL: https://github.com/apache/iggy/pull/1770#discussion_r2083206220
########## core/common/src/types/configuration/tcp_config/tcp_client_config_builder.rs: ########## @@ -37,6 +37,15 @@ impl TcpClientConfigBuilder { /// Sets the server address for the TCP client. pub fn with_server_address(mut self, server_address: String) -> Self { + let parts: Vec<&str> = server_address.split(':').collect(); + if parts.len() != 2 + || parts[0].parse::<std::net::IpAddr>().is_err() + || parts[1].parse::<u16>().is_err() + { + panic!( + "Invalid server address format. Expected format: ip:port (e.g., 127.0.0.1:8080)" + ); + } Review Comment: Thanks, I'll edit it later. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@iggy.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org