Skip to main content

MustMakeLiteral

Creates a literal from the given value, panicking if an error occurs during creation.

def MustMakeLiteral(
v: interface{}
) - > *core.Literal

Converts an arbitrary Go value into a core.Literal, panicking if the conversion fails. This function is useful when a core.Literal is strictly required and any conversion error should halt program execution.

Parameters

NameTypeDescription
vinterface{}The Go value to be converted into a core.Literal. This can be any type that MakeLiteral can process.

Returns

TypeDescription
*core.LiteralA pointer to a core.Literal representing the input value.