package debug
import "cuelang.org/go/internal/core/debug"
Package debug prints a given ADT node.
Note that the result is not valid CUE, but instead prints the internals of an ADT node in human-readable form. It uses a simple indentation algorithm for improved readability and diffing.
Package debug prints a given ADT node.
Note that the result is not valid CUE, but instead prints the internals of an ADT node in human-readable form. It uses a simple indentation algorithm for improved readability and diffing.
Index ¶
- func AppendNode(dst []byte, i adt.StringIndexer, n adt.Node, config *Config) []byte
- func NodeString(i adt.StringIndexer, n adt.Node, config *Config) string
- type Config
Functions ¶
func AppendNode ¶
AppendNode writes a string representation of the node to w.
func NodeString ¶
NodeString returns a string representation of the given node. The StringIndexer value i is used to translate elements of n to strings. Commonly available implementations of StringIndexer include *adt.OpContext and *runtime.Runtime.
Types ¶
type Config ¶
type Config struct {
Cwd string
Compact bool
Raw bool
// ExpandLetExpr causes the expression of let reference to be printed.
// Note that this may result in large outputs. Use with care.
// Only applies if Compact is false.
ExpandLetExpr bool
}
Source Files ¶
compact.go debug.go
- Version
- v0.15.1 (latest)
- Published
- Nov 21, 2025
- Platform
- linux/amd64
- Imports
- 7 packages
- Last checked
- 4 months ago –
Tools for package owners.