Skip to main content

MakePrimitiveLiteral

No overview available.

def MakePrimitiveLiteral(
v: interface{}
) - > *core.Literal, error

Builds a core.Literal object from a given primitive value. This function is used to wrap a basic Go type into the more complex core.Literal structure, which is often required for API interactions or data serialization.

Parameters

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

Returns

TypeDescription
*core.Literal, errorA pointer to a core.Literal object representing the input primitive value, or an error if the primitive conversion fails.