(ls []commonv1proto.KeyValue)
| 234 | type Labels []Label |
| 235 | |
| 236 | func LabelsFromProto(ls []commonv1proto.KeyValue) Labels { |
| 237 | out := make(Labels, 0, len(ls)) |
| 238 | for _, l := range ls { |
| 239 | out = append(out, Label{Name: l.Key, Value: StaticFromAnyValue(l.Value)}) |
| 240 | } |
| 241 | return out |
| 242 | } |
| 243 | |
| 244 | func LabelsFromArgs(args ...any) Labels { |
| 245 | if len(args)%2 != 0 { |