You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
✨ [collection] Expose utilities to convert slices into maps (#617)
<!--
Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors.
All rights reserved.
SPDX-License-Identifier: Apache-2.0
-->
### Description
expose utilities
### Test Coverage
<!--
Please put an `x` in the correct box e.g. `[x]` to indicate the testing
coverage of this change.
-->
- [x] This change is covered by existing or additional automated tests.
- [ ] Manual testing has been performed (and evidence provided) as
automated testing was not feasible.
- [ ] Additional tests are not required for this change (e.g.
documentation update).
err=commonerrors.Newf(commonerrors.ErrInvalid, "could not parse comma separated list '%v' into map as it did not have an even number of elements", input)
73
+
err=commonerrors.Newf(commonerrors.ErrInvalid, "could not convert the list into a map as it does not have an even number of elements")
66
74
return
67
75
}
68
76
69
-
pairs=make(map[string]string, numElements/2)
77
+
pairs=make(map[T]T, numElements/2)
70
78
// TODO use slices.Chunk introduced in go 23 when library is upgraded
0 commit comments