Discover Packages
cuelang.org/go
encoding
yaml
package
Version:
v0.10.0-0.dev
Opens a new window with list of versions in this module.
Published: Jun 6, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 50
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package yaml converts YAML encodings to and from CUE. When converting to CUE,
comments and position information are retained.
Decode converts a YAML file to a CUE value. Streams are returned as a list
of the streamed values.
Deprecated: use Extract and build the File with cue.Context.BuildFile.
Encode returns the YAML encoding of v.
EncodeStream returns the YAML encoding of iter, where consecutive values
of iter are separated with a `---`.
Extract parses the YAML specified by src to a CUE expression. If
there's more than one document, the documents will be returned as a
list. The src argument may be a nil, string, []byte, or io.Reader. If
src is nil, the result of reading the file specified by filename will
be used.
Validate validates the YAML and confirms it matches the constraints
specified by v. For YAML streams, all values must match v.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.