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 you are certain the conversion will succeed and prefer a panic over an error return.

Parameters

NameTypeDescription
vinterface{}The Go value to convert into a core.Literal. This can be any type that can be represented as a literal.

Returns

TypeDescription
*core.LiteralA pointer to the core.Literal representation of the input value.