mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-21 08:21:32 +00:00
replace getOpt with getopt (#22515)
This commit is contained in:
@@ -69,7 +69,7 @@ else:
|
||||
var
|
||||
task: string
|
||||
printTaskList: bool
|
||||
for kind, key, val in getOpt():
|
||||
for kind, key, val in getopt():
|
||||
case kind
|
||||
of cmdLongOption, cmdShortOption:
|
||||
case key.tolower
|
||||
|
||||
@@ -113,7 +113,7 @@ when true:
|
||||
|
||||
block:
|
||||
var zoneCfgFile = "./server_settings.json"
|
||||
for kind, key, val in getOpt():
|
||||
for kind, key, val in getopt():
|
||||
case kind
|
||||
of cmdShortOption, cmdLongOption:
|
||||
case key
|
||||
|
||||
@@ -691,7 +691,7 @@ when true:
|
||||
|
||||
block:
|
||||
var bPlayOffline = false
|
||||
for kind, key, val in getOpt():
|
||||
for kind, key, val in getopt():
|
||||
case kind
|
||||
of cmdArgument:
|
||||
if key == "offline": bPlayOffline = true
|
||||
|
||||
@@ -159,7 +159,7 @@ proc poll*(timeout: int = 250) =
|
||||
when true:
|
||||
import parseopt, strutils
|
||||
var cfgFile = "dirserver_settings.json"
|
||||
for kind, key, val in getOpt():
|
||||
for kind, key, val in getopt():
|
||||
case kind
|
||||
of cmdShortOption, cmdLongOption:
|
||||
case key
|
||||
|
||||
@@ -144,7 +144,7 @@ proc poll*(timeout: int = 250) =
|
||||
when true:
|
||||
import parseopt, strutils
|
||||
var zoneCfgFile = "./server_settings.json"
|
||||
for kind, key, val in getOpt():
|
||||
for kind, key, val in getopt():
|
||||
case kind
|
||||
of cmdShortOption, cmdLongOption:
|
||||
case key
|
||||
|
||||
@@ -65,7 +65,7 @@ else:
|
||||
var
|
||||
task: string
|
||||
printTaskList: bool
|
||||
for kind, key, val in getOpt():
|
||||
for kind, key, val in getopt():
|
||||
case kind
|
||||
of cmdLongOption, cmdShortOption:
|
||||
case key.tolowerAscii
|
||||
|
||||
Reference in New Issue
Block a user