package value

import "cuelang.org/go/internal/value"

Package value contains functions for converting values to internal types and various other Value-related utilities.

Index

Functions

func Context

func Context[Ctx *cue.Runtime | *cue.Context | cue.Value | *adt.OpContext](ctx Ctx) *cue.Context

Context returns the cue.Context of the given argument.

func FromGoType

func FromGoType(r *cue.Context, x interface{}) cue.Value

func FromGoValue

func FromGoValue(r *cue.Context, x interface{}, nilIsTop bool) cue.Value

func Make

func Make(ctx *adt.OpContext, v adt.Value) cue.Value

Make wraps cue.MakeValue.

func OpContext

func OpContext[Ctx *cue.Runtime | *cue.Context | cue.Value](c Ctx) *adt.OpContext

OpContext returns an OpContext with proper node formatting initialized.

func ToInternal

func ToInternal(v cue.Value) (*runtime.Runtime, *adt.Vertex)

func UnifyBuiltin

func UnifyBuiltin(v cue.Value, kind string) cue.Value

UnifyBuiltin returns the given Value unified with the given builtin template.

func Vertex

func Vertex(v cue.Value) *adt.Vertex

Source Files

value.go

Version
v0.13.0-alpha.3
Published
Mar 31, 2025
Platform
linux/amd64
Imports
7 packages
Last checked
1 minute ago

Tools for package owners.