cuelang.org/go@v0.13.0/pkg/tool/cli/pkg.go (about)

     1  // Code generated by cuelang.org/go/pkg/gen. DO NOT EDIT.
     2  
     3  // Package cli provides tasks dealing with a console.
     4  //
     5  // These are the supported tasks:
     6  //
     7  //	// Print sends text to the stdout of the current process.
     8  //	Print: {
     9  //		$id: _id
    10  //		_id: *"tool/cli.Print" | "print" // for backwards compatibility
    11  //
    12  //		// text is the text to be printed.
    13  //		text: string
    14  //	}
    15  //
    16  //	// Ask prompts the current console with a message and waits for input.
    17  //	//
    18  //	// Example:
    19  //	//     task: ask: cli.Ask({
    20  //	//         prompt:   "Are you okay?"
    21  //	//         response: bool
    22  //	//     })
    23  //	Ask: {
    24  //		$id: _id
    25  //		_id: "tool/cli.Ask"
    26  //
    27  //		// prompt sends this message to the output.
    28  //		prompt: string
    29  //
    30  //		// response holds the user's response. If it is a boolean expression it
    31  //		// will interpret the answer using textual yes/ no.
    32  //		response: string | bool
    33  //	}
    34  package cli
    35  
    36  import (
    37  	"cuelang.org/go/internal/core/adt"
    38  	"cuelang.org/go/internal/pkg"
    39  )
    40  
    41  func init() {
    42  	pkg.Register("tool/cli", p)
    43  }
    44  
    45  var _ = adt.TopKind // in case the adt package isn't used
    46  
    47  var p = &pkg.Package{
    48  	Native: []*pkg.Builtin{},
    49  	CUE: `{
    50  	Print: {
    51  		$id:  _id
    52  		_id:  *"tool/cli.Print" | "print"
    53  		text: string
    54  	}
    55  	Ask: {
    56  		$id:      _id
    57  		_id:      "tool/cli.Ask"
    58  		prompt:   string
    59  		response: string | bool
    60  	}
    61  }`,
    62  }