go: cuelang.org/go/internal/encoding/yaml Index | Files

package yaml

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

Index

Package Files

encode.go

func Encode Uses

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.

Package yaml imports 9 packages (graph) and is imported by 3 packages. Updated 2020-09-28. Refresh now. Tools for package owners.