cuelang.org/go@v0.10.1/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: *"tool/cli.Print" | "print" // for backwards compatibility
    10  //
    11  //		// text is the text to be printed.
    12  //		text: string
    13  //	}
    14  //
    15  //	// Ask prompts the current console with a message and waits for input.
    16  //	//
    17  //	// Example:
    18  //	//     task: ask: cli.Ask({
    19  //	//         prompt:   "Are you okay?"
    20  //	//         response: bool
    21  //	//     })
    22  //	Ask: {
    23  //		$id: "tool/cli.Ask"
    24  //
    25  //		// prompt sends this message to the output.
    26  //		prompt: string
    27  //
    28  //		// response holds the user's response. If it is a boolean expression it
    29  //		// will interpret the answer using textual yes/ no.
    30  //		response: string | bool
    31  //	}
    32  package cli
    33  
    34  import (
    35  	"cuelang.org/go/internal/core/adt"
    36  	"cuelang.org/go/internal/pkg"
    37  )
    38  
    39  func init() {
    40  	pkg.Register("tool/cli", p)
    41  }
    42  
    43  var _ = adt.TopKind // in case the adt package isn't used
    44  
    45  var p = &pkg.Package{
    46  	Native: []*pkg.Builtin{},
    47  	CUE: `{
    48  	Print: {
    49  		$id:  *"tool/cli.Print" | "print"
    50  		text: string
    51  	}
    52  	Ask: {
    53  		$id:      "tool/cli.Ask"
    54  		prompt:   string
    55  		response: string | bool
    56  	}
    57  }`,
    58  }