v icon indicating copy to clipboard operation
v copied to clipboard

net.split_address returns first part of ip address as port when its missing from string

Open daansystems opened this issue 2 years ago • 1 comments

\ \ / / | Welcome to the V REPL (for help with V itself, type exit , then run v help ). \ / / | Note: the REPL is highly experimental. For best V experience, use a text editor, \ / | save your code in a main.v file and execute: v run main.v \ / | V 0.3.0 1b46383 . Use list to see the accumulated program so far. __/ | Use Ctrl-C or exit to exit, or help to see other available commands.

import net net.split_address('192.168.1.100')? ('192.168.1.100', 192)

daansystems avatar Jul 01 '22 14:07 daansystems

\ \ / / | Welcome to the V REPL (for help with V itself, type exit , then run v help ). \ / / | Note: the REPL is highly experimental. For best V experience, use a text editor, \ / | save your code in a main.v file and execute: v run main.v \ / | V 0.3.0 1b46383 . Use list to see the accumulated program so far. __/ | Use Ctrl-C or exit to exit, or help to see other available commands.

import net net.split_address('192.168.1.100')? ('192.168.1.100', 192)

what do you expect it to do in this case? Panic or return ip, none or?

emily33901 avatar Jul 24 '22 11:07 emily33901

I would suggest 0

daansystems avatar Aug 14 '22 06:08 daansystems