add IpAddress equivalents for ValidIpAddress support (#94)
This commit is contained in:
parent
674c9e4c8e
commit
07b598ff28
|
@ -11,6 +11,13 @@ func completeCmdArg*(T: type ValidIpAddress, val: string): seq[string] =
|
|||
# TODO: Maybe complete the local IP address?
|
||||
@[]
|
||||
|
||||
func parseCmdArg*(T: type IpAddress, s: string): T =
|
||||
parseIpAddress(s)
|
||||
|
||||
func completeCmdArg*(T: type IpAddress, val: string): seq[string] =
|
||||
# TODO: Maybe complete the local IP address?
|
||||
@[]
|
||||
|
||||
func parseCmdArg*(T: type Port, s: string): T =
|
||||
template fail =
|
||||
raise newException(ValueError,
|
||||
|
|
Loading…
Reference in New Issue