Documentation ¶
Overview ¶
Package internal exposes some cue internals to other packages.
A better name for this package would be technicaldebt.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var BaseContext = apd.BaseContext.WithPrecision(24)
BaseContext is used as CUEs default context for arbitrary-precision decimals
var CheckAndForkRuntime func(runtime, value interface{}) interface{}
CheckAndForkRuntime checks that value is created using runtime, panicking if it does not, and returns a forked runtime that will discard additional keys.
var DebugStr func(x interface{}) string
DebugStr prints a syntax node.
var DropOptional bool
DropOptional is a blanket override of handling optional values during compilation. TODO: should we make this a build option?
var EvalExpr func(value, expr interface{}) (result interface{})
EvalExpr evaluates an expression within an existing struct value. Identifiers only resolve to values defined within the struct.
Expressions may refer to builtin packages if they can be uniquely identified ¶
Both value and result are of type cue.Value, but are an interface to prevent cyclic dependencies.
TODO: extract interface
var FromGoType func(instance, x interface{}) interface{}
FromGoType converts an arbitrary Go type to the corresponding CUE value. instance must be of type *cue.Instance. The returned value is a cue.Value, which the caller must cast to.
var FromGoValue func(instance, x interface{}, allowDefault bool) interface{}
FromGoValue converts an arbitrary Go value to the corresponding CUE value. instance must be of type *cue.Instance. The returned value is a cue.Value, which the caller must cast to.
var GetRuntime func(instance interface{}) interface{}
GetRuntime reports the runtime for an Instance.
var UnifyBuiltin func(v interface{}, kind string) interface{}
UnifyBuiltin returns the given Value unified with the given builtin template.
Functions ¶
func LabelName ¶ added in v0.0.10
LabelName reports the name of a label, if known, and whether it is valid.
func ListEllipsis ¶ added in v0.0.6
ListEllipsis reports the list type and remaining elements of a list. If we ever relax the usage of ellipsis, this function will likely change. Using this function will ensure keeping correct behavior or causing a compiler failure.
Types ¶
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
qgo
qgo builds CUE builtin packages from Go packages.
|
qgo builds CUE builtin packages from Go packages. |
Package copy provides utilities to copy files and directories.
|
Package copy provides utilities to copy files and directories. |
Package source contains utility functions that standardize reading source bytes across cue packages.
|
Package source contains utility functions that standardize reading source bytes across cue packages. |
Package str provides string manipulation utilities.
|
Package str provides string manipulation utilities. |
Package task provides a registry for tasks to be used by commands.
|
Package task provides a registry for tasks to be used by commands. |
third_party
|
|
yaml
Package yaml implements YAML support for the Go language.
|
Package yaml implements YAML support for the Go language. |