I am trying to format a string based on the elements received from the function calling it. This number of elements can varyfrom one to many.
Is there a way to call fmt.Sprintf with a variable number of elements. Something along the lines of:
receivedElements := []interface{}{"some","values"}
formattedString := fmt.Sprintf("Received elements: ...%s", receivedElements...)
Output: Received elements: some values