natives

package
v0.31.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2026 License: Apache-2.0 Imports: 17 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseJSON

func ParseJSON(reader io.Reader) (interface{}, error)

ParseJSON parses the contents of the reader into a data object and returns it.

func ParseYAMLDocuments

func ParseYAMLDocuments(reader io.Reader) ([]interface{}, error)

ParseYAMLDocuments parses the contents of the reader into an array of objects, one for each non-nil document in the input.

func Register

func Register(vm *jsonnet.VM)

Register adds qbec's native jsonnet functions to the provided VM

func RenderYAMLDocuments

func RenderYAMLDocuments(data interface{}, writer io.Writer) (retErr error)

RenderYAMLDocuments renders the supplied data as a series of YAML documents if the input is an array or a single document when it is not. Nils are excluded from output. If the caller wants an array to be rendered as a single document, they need to wrap it in an array first. Note that this function is not a drop-in replacement for data that requires ghodss/yaml to be rendered correctly.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL