OptConfig
Mojo struct 🡭
OptConfig
@memory_only
struct OptConfigCreate an option to be added to the OptParser.
Fields
- long_name (
String): Required long name of, this will be used as the cli value as--long_name. - default_value (
Optional[String]): If there is one, the Stringified deafult value. This will be parsed viaOptKind. - value_kind (
OptKind): The type of the value for this option. - is_flag (
Bool): If it’s a flag, then it’s value_kind needs to be Bool. - description (
String): Long for description, for best results, don’t add a newline.
Implemented traits
AnyType, Copyable, Deinitable, Movable
Methods
➕ ➖__init__
def __init__(out self, var long_name: String, value_kind: OptKind, *, is_flag: Bool = False, var description: String = "", var default_value: Optional[String] = None)Details
Args:
- long_name (
String) - value_kind (
OptKind) - is_flag (
Bool) - description (
String) - default_value (
Optional[String]) - self (
Self)
Returns:
Self
Raises: