Skip to main content

MustMakePrimitive

Creates a new Primitive from the given interface value. This function panics if an error occurs during the creation of the Primitive.

def MustMakePrimitive(
v: interface{}
) - > *core.Primitive

Creates a new core.Primitive from the given value. This function panics if the primitive cannot be created, making it suitable for situations where a primitive is expected to be formed successfully.

Parameters

NameTypeDescription
vinterface{}The value to convert into a core.Primitive. This can be any type that MakePrimitive can process.

Returns

TypeDescription
*core.PrimitiveA pointer to the created core.Primitive.