package yaml

import "cuelang.org/go/internal/encoding/yaml"

Index

Functions

func Encode

func Encode(n ast.Node) (b []byte, err error)

Encode converts a CUE AST to YAML.

The given file must only contain values that can be directly supported by YAML:

Type          Restrictions
BasicLit
File          no imports, aliases, or definitions
StructLit     no embeddings, aliases, or definitions
List
Field         must be regular; label must be a BasicLit or Ident
CommentGroup

TODO: support anchors through Ident.

Source Files

encode.go

Version
v0.5.0-rc.1
Published
Mar 31, 2023
Platform
linux/amd64
Imports
13 packages
Last checked
2 hours ago

Tools for package owners.