You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
val nameKey = Key("name", stringType, "DefaultName")
val name = config[nameKey] /// if not contains in CONFIG -> ="DefaultName"
If use -h command it will print:
Description of NAME. Default value: DefaultName
And if not setted in configuration - use Deafult Value
instead I do now:
val connectiontimeoutKey = Key("connection.timeout", intType)
fun getConnectionTimeout(): Int {
return if (connectiontimeoutKey in vals) vals[connectiontimeoutKey]
else DEFAULT_CONNECTION_TIMEOUT
}
but I need:
val connectiontimeoutKey = Key("connection.timeout", intType, DEFAULT_CONNECTION_TIMEOUT)
fun getConnectionTimeout(): Int {
return vals[connectiontimeoutKey]
}
The text was updated successfully, but these errors were encountered:
Please add
default
field intoKey
:If use -h command it will print:
Description of NAME. Default value: DefaultName
And if not setted in configuration - use Deafult Value
instead I do now:
but I need:
The text was updated successfully, but these errors were encountered: