cli

package
v0.8.0-alpha.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package cli provides tasks dealing with a console.

These are the supported tasks:

// Print sends text to the stdout of the current process.
Print: {
	$id: *"tool/cli.Print" | "print" // for backwards compatibility

	// text is the text to be printed.
	text: string
}

// Ask prompts the current console with a message and waits for input.
//
// Example:
//     task: ask: cli.Ask({
//         prompt:   "Are you okay?"
//         response: bool
//     })
Ask: {
	$id: "tool/cli.Ask"

	// prompt sends this message to the output.
	prompt: string

	// response holds the user's response. If it is a boolean expression it
	// will interpret the answer using textual yes/ no.
	response: string | bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL