mirror of
https://github.com/status-im/nim-confutils.git
synced 2025-01-22 01:50:35 +00:00
Add support for int params
This commit is contained in:
parent
d2e4e02c3b
commit
af24b62e80
@ -8,7 +8,13 @@ proc parse*(T: type DirPath, p: TaintedString): T =
|
|||||||
result = DirPath(p)
|
result = DirPath(p)
|
||||||
|
|
||||||
template parse*(T: type string, s: TaintedString): string =
|
template parse*(T: type string, s: TaintedString): string =
|
||||||
string(s)
|
string s
|
||||||
|
|
||||||
|
proc parse*(T: type SomeSignedInt, s: TaintedString): T =
|
||||||
|
T parseInt(string s)
|
||||||
|
|
||||||
|
proc parse*(T: type SomeUnsignedInt, s: TaintedString): T =
|
||||||
|
T parseUInt(string s)
|
||||||
|
|
||||||
proc load*(Configuration: type,
|
proc load*(Configuration: type,
|
||||||
cmdLine = commandLineParams(),
|
cmdLine = commandLineParams(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user