Add support for int params

This commit is contained in:
Zahary Karadjov 2018-11-22 23:15:50 +02:00
parent d2e4e02c3b
commit af24b62e80

View File

@ -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(),