Skip to main content

MetricKeysFromStrings

Converts a slice of strings into a slice of Keys.

def MetricKeysFromStrings(
keys: []string
) - > []Key

Converts a slice of strings into a slice of Key objects. This is a convenience method to facilitate working with metric keys.

Parameters

NameTypeDescription
keys[]stringThe slice of strings to be converted into Key objects.

Returns

TypeDescription
[]KeyA slice of Key objects, where each Key corresponds to an input string.