To install the library, follow the steps below:
- Download the library package from the releases page
- Extract the package
- Include the extracted directory in your project's source (don't forget to run
julec mod init
)
Example usage of the library:
use "cliq"
fn main() {
mut cliq := cliq::Builder{
Args: {
// flag: default value (type)
"ping": false,
"message": "",
},
}.Help().Build()
cliq.GetCLI()
cliq.Parse()
ping := cliq.Get("ping") // bool due to the default value
message := cliq.Get("message") // str due to the default value
if ping == true {
print("pong! ")
println(message)
}
}
See the examples directory for more examples.
The extension is distributed under the terms of the BSD 3-Clause license.
See License Details