clikt / com.github.ajalt.clikt.parameters.options / EagerOption / <init>

<init>

EagerOption(vararg names: String, nvalues: Int = 0, help: String = "", hidden: Boolean = false, callback: OptionTransformContext.() -> Unit) EagerOption(names: Set<String>, nvalues: Int, help: String, hidden: Boolean, callback: OptionTransformContext.() -> Unit)

An Option with no values that is finalized before other types of options.

Parameters

callback - This callback is called when the option is encountered on the command line. If you want to print a message and halt execution normally, you should throw a PrintMessage exception. The callback it passed the current execution context as a parameter.