Skip to main content

MustMakePrimitiveLiteral

No overview available.

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

Creates a primitive literal from the given value. This function panics if the literal cannot be created, making it suitable for situations where a valid literal is expected.

Parameters

NameTypeDescription
vinterface{}The value to convert into a primitive literal. This value must be convertible to a primitive literal type.

Returns

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