View Source Clik.Option (Clik v0.2.1)
Configurable CLI flag.
Link to this section Summary
Types
Individual options used to configure an instance of Clik.Option
Valid option types
Valid option value types
Set of configuration options used to configure an instance of Clik.Option
Struct corresponding to a single CLI flag or switch
Link to this section Types
@type error() :: {:error, atom()}
@type opt() :: {:default, option_value()} | {:help, String.t()} | {:hidden, boolean()} | {:long, atom()} | {:required, boolean()} | {:short, atom()} | {:type, option_type()}
Individual options used to configure an instance of Clik.Option
@type option_type() :: :float | :integer | :string | :boolean | :count
Valid option types
Valid option value types
@type opts() :: [] | [opt()]
Set of configuration options used to configure an instance of Clik.Option
@type t() :: %Clik.Option{ default: option_type() | nil, help: String.t(), hidden: boolean(), long: atom(), name: term(), required: boolean(), short: atom(), type: option_type() }
Struct corresponding to a single CLI flag or switch
Link to this section Functions
Creates a new Clik.Option
instance.
Returns {:ok, t}
or {:error, reason}
.
Creates a new Clik.Option
instance.
Raises ArgumentError
on error.