...

Source file src/cuelang.org/go/pkg/tool/os/pkg.go

Documentation: cuelang.org/go/pkg/tool/os

     1  // Code generated by cuelang.org/go/pkg/gen. DO NOT EDIT.
     2  
     3  // Package os defines tasks for retrieving os-related information.
     4  //
     5  // CUE definitions:
     6  //
     7  //	// A Value are all possible values allowed in flags.
     8  //	// A null value unsets an environment variable.
     9  //	Value: bool | number | *string | null
    10  //
    11  //	// Name indicates a valid flag name.
    12  //	Name: !="" & !~"^[$]"
    13  //
    14  //	// Setenv defines a set of command line flags, the values of which will be set
    15  //	// at run time. The doc comment of the flag is presented to the user in help.
    16  //	//
    17  //	// To define a shorthand, define the shorthand as a new flag referring to
    18  //	// the flag of which it is a shorthand.
    19  //	Setenv: {
    20  //		$id: "tool/os.Setenv"
    21  //
    22  //		{[Name]: Value}
    23  //	}
    24  //
    25  //	// Getenv gets and parses the specific command line variables.
    26  //	Getenv: {
    27  //		$id: "tool/os.Getenv"
    28  //
    29  //		{[Name]: Value}
    30  //	}
    31  //
    32  //	// Environ populates a struct with all environment variables.
    33  //	Environ: {
    34  //		$id: "tool/os.Environ"
    35  //
    36  //		// A map of all populated values.
    37  //		// Individual entries may be specified ahead of time to enable
    38  //		// validation and parsing. Values that are marked as required
    39  //		// will fail the task if they are not found.
    40  //		{[Name]: Value}
    41  //	}
    42  //
    43  //	// Clearenv clears all environment variables.
    44  //	Clearenv: {
    45  //		$id: "tool/os.Clearenv"
    46  //	}
    47  package os
    48  
    49  import (
    50  	"cuelang.org/go/internal/core/adt"
    51  	"cuelang.org/go/internal/pkg"
    52  )
    53  
    54  func init() {
    55  	pkg.Register("tool/os", p)
    56  }
    57  
    58  var _ = adt.TopKind // in case the adt package isn't used
    59  
    60  var p = &pkg.Package{
    61  	Native: []*pkg.Builtin{},
    62  	CUE: `{
    63  	Value: bool | number | *string | null
    64  	Name:  !="" & !~"^[$]"
    65  	Setenv: {
    66  		{
    67  			[Name]: Value
    68  		}
    69  		$id: "tool/os.Setenv"
    70  	}
    71  	Getenv: {
    72  		{
    73  			[Name]: Value
    74  		}
    75  		$id: "tool/os.Getenv"
    76  	}
    77  	Environ: {
    78  		{
    79  			[Name]: Value
    80  		}
    81  		$id: "tool/os.Environ"
    82  	}
    83  	Clearenv: {
    84  		$id: "tool/os.Clearenv"
    85  	}
    86  }`,
    87  }
    88  

View as plain text