MakeLiteralForCollection
Converts a slice of interface{} values into a core.Literal representing a collection of literals. It iterates through the input slice, converting each element into a core.Literal, and then encapsulates these literals within a core.LiteralCollection.
def MakeLiteralForCollection(
v: []interface{}
) - > *core.Literal, error
Converts a slice of arbitrary Go interface values into a single core.Literal representing a collection of literals. This function is used to create a literal representation of a list or array of values, where each element in the input slice is individually converted into a core.Literal.
Parameters
| Name | Type | Description |
|---|---|---|
| v | []interface{} | The slice of arbitrary Go interface values to be converted into a collection of literals. |
Returns
| Type | Description |
|---|---|
*core.Literal, error | A pointer to a core.Literal representing the collection, or an error if any of the individual values cannot be converted into a literal. |