go: cuelang.org/go/pkg/tool/cli Index | Files

package cli

import "cuelang.org/go/pkg/tool/cli"

Package cli provides tasks dealing with a console.

These are the supported tasks:

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

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

// TODO:
// Ask prompts the current console with a message and waits for input.
//
// Example:
//     task ask: cli.Ask({
//         prompt:   "Are you okay?"
//         repsonse: bool
//     })
// Ask: {
//  kind: "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
// }

Index

Package Files

cli.go doc.go

Package cli imports 3 packages (graph) and is imported by 2 packages. Updated 2019-08-18. Refresh now. Tools for package owners.