-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
Please add default field into Key:
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]
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels